react-native-unity-view icon indicating copy to clipboard operation
react-native-unity-view copied to clipboard

Exception on Android with BackHandler returning false

Open im-aditya opened this issue 6 years ago • 2 comments

Steps to reproduce:

  1. Add BackHandler to the react native component
  2. return false in the hardwarebackPress handler
  3. Press hardware back button on the device. The app will go in background.
  4. Press the square button on the device to show all the background apps.
  5. Tap on the app to bring it to foreground
  6. The app will crash with this exception:
09-27 21:36:59.475 24592-24592/com.myproject.projectname E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.myproject.projectname, PID: 24592
java.lang.Error: FATAL EXCEPTION [main]
Unity version     : 2018.1.8f1
Device model      : motorola Moto G (5S) Plus
Device fingerprint: motorola/sanders_n/sanders_n:7.1.1/7:user/release-keys

Caused by: java.lang.UnsatisfiedLinkError: No implementation found for void com.unity3d.player.UnityPlayer.nativeRestartActivityIndicator() (tried Java_com_unity3d_player_UnityPlayer_nativeRestartActivityIndicator and Java_com_unity3d_player_UnityPlayer_nativeRestartActivityIndicator__)
at com.unity3d.player.UnityPlayer.nativeRestartActivityIndicator(Native Method)
at com.unity3d.player.UnityPlayer.resume(Unknown Source)
at com.reactnative.unity.view.UnityViewManager.onHostResume(UnityViewManager.java:101)
at com.facebook.react.bridge.ReactContext.onHostResume(ReactContext.java:184)
at com.facebook.react.ReactInstanceManager.moveToResumedLifecycleState(ReactInstanceManager.java:649)
at com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:568)
at com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:524)
at com.facebook.react.ReactActivityDelegate.onResume(ReactActivityDelegate.java:102)
at com.facebook.react.ReactActivity.onResume(ReactActivity.java:64)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1291)
at android.app.Activity.performResume(Activity.java:6791)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3427)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3490)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2749)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1490)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6165)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)

im-aditya avatar Sep 27 '18 16:09 im-aditya

Can anyone please help me with this ? I really need to fix this crash. It has become a blocking issue for my app update.

im-aditya avatar Oct 09 '18 12:10 im-aditya

Encountered this, but don't have a solution.

I'm trying to integrate react-native-unity-view on a new sample project (both rn and unity projects are fresh starts). I did not run into this issue while getting react-native-unity-demo working

I can get the app loading, but when I click the button to start the unity view, the app crashes with this error

clintdoriot avatar Feb 08 '19 19:02 clintdoriot