We have tried apk in all different devices and in android studio too to check compatibility. But still its not working and closing automatically.
To build apk, we use eas build -p android --profile preview
We checked using expo start -c to run locally and no error found.
If it works in Expo Go, then first check that you do not have ios and android directories in your app.
If you did have those and you deleted them, then try building again to see if that fixes it.
If there’s still a problem, try running expo start --no-dev --minify and see if it crashes in Expo Go. If so, you can more easily see what is going wrong and fix it.
Thanks for your guidance. It does help us to understand in more details. Though , we managed to sort out using android studio’s log file.
Found out four below packages which were causing to run on android studio as well as our devices. -
react-native-autoheight-webview
expo-file-system
expo-permissions
expo-media-library packages
After removal of all packages and related code, it worked in every device.
So I would suggest to all developers to check compatibility after adding new packages as Expo and eas-cli behave slightly different to have your successful apk file.