Closed alialim closed 3 months ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
same on me ; Screens version 3.31.1 Device model Xioami 9t pro - Android 11 react-native 0.74.1 i complated all of installation steps.
@acarkaan
Yesterday I also updated to the latest React native version 0.74.1 and updated all packages to the latest version. But still the same error. My ideas are slowly coming to an end.
@alialim thanks for your message, i try to solve problem too ı guess problem releated mainapplication.kt super class
@alialim I think the issue is solved here https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067 and also this explains the issue of restoring the app from the background https://github.com/software-mansion/react-native-screens?tab=readme-ov-file#android
Hey, exactly as @Basil-Code has pointed out, this is a long standing issue due to how React & Android interact with each other (this is discussed in #17). For now the recommendation is to follow library's installation steps.
I'm closing the issue, but not restricting discussion. Feel free to tag me if there is any breakthrough.
@alialim
** libs "react": "18.2.0", "react-native": "0.73.0", "react-native-screens": "^3.31.1",
** file: mainactivity.kt
....
import android.os.Bundle;
....
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(null);
.........
}
** device Xioami 9T Oppo 6pro
** comment please dont forget build clean and ı noticed another thing that problem was model based.While it crashed on the Xiaomi device, it was working fine on the oppo. 3.31.1 version solved xiomi too
Description
Hello everyone,
My app in Android crashes when restoring from the background when I want to use the camera.
Since I've been through all the forums but none of the solutions have helped I'm looking for help here again. I am using React Navigation. In the documentation of React Navigation it says I should add the function
class MainActivity: ReactActivity() { // ... override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(null) } // ... }
to ensure that the app does not crash. The problem is that the app is restarted when the error occurs and the last page is no longer displayed.
Device is: Samsung Galaxy Tab 7 FE 5G
My React Native version:
“react-native”: “0.73.2” “@react-navigation/bottom-tabs”: “^6.5.11”, “@react-navigation/native”: “^6.1.9”, “@react-navigation/stack”: “^6.3.20”, “react-native-screens”: “^3.31.1”,
Here is the logcat excerpt of the error
Many thanks to everyone who can help me here.
Steps to reproduce
See Description
Snack or a link to a repository
https://stackoverflow.com/help/mcve
Screens version
3.31.1
React Native version
0.73.2
Platforms
Android
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Real device
Device model
Samsung Galaxy Tab 7 FE 5G (Android 14)
Acknowledgements
Yes