I updated my Expo project to SDK 48.0.10 . It works fine on test environments and Expo Go, but when I produce an APK and install it on my device, it gets stuck on the splash screen. I’ve tried many things but no luck yet.
SDK Version: 48.0.10
Things to consider:
App flashes one time and nothing happens
When I downgraded to SDK 47, it works fine
Updated all packages and Node version,
Did everything from the Expo migration guide Any suggestions would be appreciated.
Could you elaborate on what you mean by “test environments”?
Do you have an android directory in your app? If so, you probably ran npx expo run:android or npx expo prebuild at some point. This generates the android directory, effectively switching you to the Bare workflow. Since you say the app works correctly in Expo Go, that implies that your app should work fine in the Managed workflow. To switch back to the managed workflow you can delete the android directory (and ios).
Otherwise, read through these guides to help figure out what’s causing the problem:
Hi, @wodin . Thank you for your help.
I mean Expo Go when I say test environments.
Update: I updated some other dependencies, and now it is working again. I don’t exactly know which one, but I updated the dependencies to the latest versions, which are newer than the versions recommended by the Expo migration guide. I also updated the Babel version. I went to npm, searched for all package names, and checked that the versions were the latest.
Here are all of the dependencies that I am using and have updated:
I ran npx expo-doctor and the versions got stuck. I will try it again, and if it works as expected, I’ll update this topic. In addition, I will run npx expo install --check to test whether it will solve my problem and ensure that I have installed the correct versions.
I appreciate your assistance.
@devalnor blindly upgrading all of your dependencies can cause problems. Especially if you’re on an older version of the Expo SDK. Also, some things like React Navigation need code changes when upgrading from version 3.x to version 4.x.
You should instead run npx expo-doctor and npx expo install --check.
For non-Expo dependencies you can still run yarn outdated or npm outdated and then check each one to see whether you should upgrade it, and whether you need to make changes to your code as a result.