'React native expo app works fine in expo go, white screen of death after build
I have created a react native app based on the Expo environment/packages. The app works completely fine while being tested in the Expo (Go) emulating app on various devices.
However when I build the app for Android, install it and run it:
- the
.aabversion opens splash screen and closes immediately - the
.apkversion opens splash screen and then there's just a blank screen
I thought this could do something with the AdMobBanner component (which however has the correct config and a real ad-related ids set up in the app.json section for android.
These are the permissions requested for android
"permissions": [
"android.permission.CAMERA",
"android.permission.READ_EXTERNAL_STORAGE",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.RECORD_AUDIO",
"true"
],
The expo used is ^44.0.6.
Besides totally basic stuff the app is doing - selecting image from gallery, taking a photo and copying that into possibly newly created album, using SQLite database to store data locally, opening map inside the app to select latitude/longitude - however none of these are present on the Home screen.
I've also noticed that these are dev dependencies
"devDependencies": {
"@babel/core": "^7.12.9",
"@types/jest": "^27.4.0",
"@types/react": "~17.0.21",
"@types/react-native": "~0.67.3",
"@types/react-test-renderer": "^17.0.1",
"react-native-bundle-visualizer": "^3.1.1",
"typescript": "~4.6.2"
},
Are some of these required in the production? (e.g. the app is written using typescript)
What could be a reason that would make the app run just fine in expo go but crash when deployed itself?
I also tried to connect debugger from Android Studio - but that's a different issue - the debugger is waiting for the app to come online and the app is waiting for debugger to be attached even though the debugger opened the application...
So is there some way to maybe send some debugging information some other way or to make them appear somehow in the Google Play console?
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
