Setting enableAndroidTestCoverage = true causes java.lang.VerifyError at runtime.
java.lang.VerifyError: Verifier rejected class com.starmicronics.stario10.stardevicediscoverymanager.c: java.lang.Object com.starmicronics.stario10.stardevicediscoverymanager.c.a(com.starmicronics.stario10.StarDeviceDiscoveryManager$Callback, com.starmicronics.stario10.util.g, kotlin.coroutines.Continuation) failed to verify: java.lang.Object com.starmicronics.stario10.stardevicediscoverymanager.c.a(com.starmicronics.stario10.StarDeviceDiscoveryManager$Callback, com.starmicronics.stario10.util.g, kotlin.coroutines.Continuation): [0xE5] expected to be within a catch-all for an instruction where a monitor is held (declaration of 'com.starmicronics.stario10.stardevicediscoverymanager.c' appears in /data/app/~~q8BrsKzOqHykjmPLTlTQAg==/se.jzonite.teststartprinter-zpdDQ9YDEyG_JPFa1Ro9Iw==/base.apk!classes5.dex) at com.starmicronics.stario10.StarDeviceDiscoveryManagerFactory$Companion.create(Unknown Source:56) at com.starmicronics.stario10.StarDeviceDiscoveryManagerFactory$Companion.create(Unknown Source:85) at se.jzonite.teststartprinter.MainActivity.search(MainActivity.kt:88) at se.jzonite.teststartprinter.MainActivity.onCreate(MainActivity.kt:48) at android.app.Activity.performCreate(Activity.java:8595) at android.app.Activity.performCreate(Activity.java:8573) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3764) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
I noticed this when updating from 1.0.1 to 1.5.0. The 1.0.1 version doesn't have this problem.
Description
Setting
enableAndroidTestCoverage = true
causesjava.lang.VerifyError
at runtime.java.lang.VerifyError: Verifier rejected class com.starmicronics.stario10.stardevicediscoverymanager.c: java.lang.Object com.starmicronics.stario10.stardevicediscoverymanager.c.a(com.starmicronics.stario10.StarDeviceDiscoveryManager$Callback, com.starmicronics.stario10.util.g, kotlin.coroutines.Continuation) failed to verify: java.lang.Object com.starmicronics.stario10.stardevicediscoverymanager.c.a(com.starmicronics.stario10.StarDeviceDiscoveryManager$Callback, com.starmicronics.stario10.util.g, kotlin.coroutines.Continuation): [0xE5] expected to be within a catch-all for an instruction where a monitor is held (declaration of 'com.starmicronics.stario10.stardevicediscoverymanager.c' appears in /data/app/~~q8BrsKzOqHykjmPLTlTQAg==/se.jzonite.teststartprinter-zpdDQ9YDEyG_JPFa1Ro9Iw==/base.apk!classes5.dex) at com.starmicronics.stario10.StarDeviceDiscoveryManagerFactory$Companion.create(Unknown Source:56) at com.starmicronics.stario10.StarDeviceDiscoveryManagerFactory$Companion.create(Unknown Source:85) at se.jzonite.teststartprinter.MainActivity.search(MainActivity.kt:88) at se.jzonite.teststartprinter.MainActivity.onCreate(MainActivity.kt:48) at android.app.Activity.performCreate(Activity.java:8595) at android.app.Activity.performCreate(Activity.java:8573) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3764) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
I noticed this when updating from 1.0.1 to 1.5.0. The 1.0.1 version doesn't have this problem.
I've uploaded an android starter project experiencing the problem here: https://github.com/Jonazon/stario-verify-error