I have a simple app which uses react navigation v6. It doesn’t use any other heavy third party libraries. All its using is react-navigation-v6. It works totally fine in Expo-Go during development but when i build a development apk with eas build it is stuck on loading screen always. The loading screen is my custom built component which i show at start to get data and authenticate user.
This is the command i use for building:
eas build --platform android --profile preview2
In the preview2 profile i have set buildtype to apk
In particular, when something works in development but not in production, try this:
Hint: Sometimes, running your app in “production mode” locally will show errors that normally wouldn’t be thrown. You can run an app locally in production by running npx expo start --no-dev --minify. “–no-dev” tells the server not to be run in development mode, and “–minify” will minify your code the same way it is for production JavaScript bundles.
but also see the info on the rest of the page.
The default build type for the preview profile is already “apk”
Yes, it’s an implicit default. If you delete eas.json and run eas build:configure then it will generate the default eas.json. You will see that there is no buildType specified, however, the development and preview profiles will build an APK, and the production profile will build an AAB.
It will not cause problems if you explicitly set buildType, though.