Java.lang.VerifyError on start new activity

I was trying to rewrite an old project in Kotlin, and was successful in most of the porting. However, I cannot seem to find a solution to this particular problem:

04-27 20:17:16.651 6454-6454/com.vasilev.zonskoparkiranjeskopje E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.vasilev.zonskoparkiranjeskopje, PID: 6454
java.lang.VerifyError: Rejecting class com.vasilev.zonskoparkiranjeskopje.ParkingActivity because it failed compile-time verification (declaration of ‘com.vasilev.zonskoparkiranjeskopje.ParkingActivity’ appears in /data/app/com.vasilev.zonskoparkiranjeskopje-2/base.apk)
at java.lang.Class.newInstance(Native Method)
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)

Before someone asks, I disabled Instant Run manually, but to no avail. Here is the source code of the activity in question. It is being called by a normal startActivity(intent) call. This is happening across all API levels and across two different android gradle plugins, v2.0 and v2.1. (3.7 KB)

I apologize for the file being in .zip. It is simply a .kt file in an archive. This forum doesn’t accept plain text I guess.

Thanks in advance, cheers.

I would like to say that I solved this and in fact it was my own fault. I had a return statement at the end of a lambda expression, which made the type of onPrepareOptionsMenu() to Nothing instead of Unit, and because it is an overridden function, the class was rejected by the runtime.