react-native-screens
react-native-screens copied to clipboard
Fatal Exception java.lang.RuntimeException: Unable to start activity ComponentInfo Unable to instantiate fragment com.swmansion.rnscreens.n
Description
I received this error on real devices and could not find a solution.
Steps to reproduce
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{appName/appName.MainActivity}: androidx.fragment.app.Fragment$j: Unable to instantiate fragment com.swmansion.rnscreens.n: calling Fragment constructor caused an exception at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3815) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3977) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:109) 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:2374) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:233) at android.os.Looper.loop(Looper.java:344) at android.app.ActivityThread.main(ActivityThread.java:8249) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071)
Caused by androidx.fragment.app.Fragment$j: Unable to instantiate fragment com.swmansion.rnscreens.n: calling Fragment constructor caused an exception
at androidx.fragment.app.Fragment.instantiate(Fragment.java:631)
at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
at androidx.fragment.app.FragmentManager$3.instantiate(FragmentManager.java:483)
at androidx.fragment.app.FragmentStateManager.<init>(FragmentStateManager.java:85)
at androidx.fragment.app.FragmentManager.restoreSaveState(FragmentManager.java:2728)
at androidx.fragment.app.FragmentController.restoreSaveState(FragmentController.java:198)
at androidx.fragment.app.FragmentActivity$2.onContextAvailable(FragmentActivity.java:149)
at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.java:99)
at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:352)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:273)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:45)
at com.frontguard.when.MainActivity.onCreate(MainActivity.java:16)
Snack or a link to a repository
Screens version
3.20.0
React Native version
0.71.6
Platforms
Android
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
None
Build type
Release mode
Device
Real device
Device model
No response
Acknowledgements
Yes