Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android crash: Unable to instantiate fragment #390

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

guytepper
Copy link
Member

Crashlytics started to report the following crash on Android devices:

Unable to instantiate fragment com.swmansion.rnscreens.ScreenStackFragment: calling Fragment constructor caused an exception

A thrown error has suggested this fix:

Screen fragments should never be restored. Follow instructions from https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067 to properly configure your main activity.

We had the MainActivity.java configured properly, but when migrating to Kotlin on the latest version (2.3.3), we forgot to add it to MainActivity.kt.

@guytepper guytepper requested a review from planecore November 13, 2024 09:02
@guytepper guytepper merged commit b1a2876 into main Nov 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants