(Android only) VerifyError: Verifier rejected class com.reactnativenavigation.views.element.TransitionSetCreator

🐛 Bug Report

After updating from v6 to v7 and following the update instructions, app crashes with the following:
Just for android, working fine for ios.

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: fm.podyssey.podcasts, PID: 18727
    java.lang.VerifyError: Verifier rejected class com.reactnativenavigation.views.element.TransitionSetCreator: java.lang.Object com.reactnativenavigation.views.element.TransitionSetCreator.createElementTransitions(com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController, com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController, com.reactnativenavigation.options.ElementTransitions, kotlin.coroutines.Continuation) failed to verify: java.lang.Object com.reactnativenavigation.views.element.TransitionSetCreator.createElementTransitions(com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController, com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController, com.reactnativenavigation.options.ElementTransitions, kotlin.coroutines.Continuation): [0xD] register v6 has type Precise Reference: com.reactnativenavigation.options.ElementTransitions but expected Precise Reference: kotlin.jvm.internal.Ref$ObjectRef
     java.lang.Object com.reactnativenavigation.views.element.TransitionSetCreator.createSharedElementTransitions(com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController, com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController, com.reactnativenavigation.options.SharedElements, kotlin.coroutines.Continuation) failed to verify: java.lang.Object com.reactnativenavigation.views.element.TransitionSetCreator.createSharedElementTransitions(com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController, com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController, com.reactnativenavigation.options.SharedElements, kotlin.coroutines.Continuation): [0xD] register v6 has type Precise Reference: com.reactnativenavigation.options.SharedElements but expected Precise Reference: kotlin.jvm.internal.Ref$ObjectRef (declaration of 'com.reactnativenavigation.views.element.TransitionSetCreator' appears in /data/app/fm.podyssey.podcasts-L9abPDrQiB54eHV56lg2Lw==/base.apk!classes4.dex)
        at com.reactnativenavigation.views.element.TransitionAnimatorCreator.<init>(TransitionAnimatorCreator.kt:21)
        at com.reactnativenavigation.viewcontrollers.modal.ModalAnimator.<init>(ModalAnimator.kt:20)
        at com.reactnativenavigation.viewcontrollers.modal.ModalAnimator.<init>(Unknown Source:2)
        at com.reactnativenavigation.viewcontrollers.modal.ModalStack.<init>(ModalStack.java:34)
        at com.reactnativenavigation.NavigationActivity.onCreate(NavigationActivity.java:41)
        at fm.podyssey.podcasts.MainActivity.onCreate(MainActivity.java:25)
        at android.app.Activity.performCreate(Activity.java:7802)
        at android.app.Activity.performCreate(Activity.java:7791)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

error: kotlin.coroutines.Continuation) failed to verify

To Reproduce

(Write your steps here:)

  1. yarn remove react-native-navigation & yarn install react-native-navigation
  2. cd ios & pod install, npx jetify
  3. made necessary changes as specified here
  4. invalidate cache and restart
  5. run app

Expected behavior

No error.

Actual Behavior

Build successful but app crashes immediately after launch.

Your Environment

  • React Native Navigation version: 7.8.3
  • React Native version: 0.63.4
  • Platform(s) (iOS, Android, or both?): Android only
  • Device info (Simulator/Device? OS version? Debug/Release?): Pixel 3 API 29 emulator
  • Kotlin version 1.3.72

1 possible answer(s) on “(Android only) VerifyError: Verifier rejected class com.reactnativenavigation.views.element.TransitionSetCreator