Expo App not opening after instalation in Android device

Hello,

I’ve built an expo app and the build was successful, but when I install it in my android device, it only shows the splash screen and then it closes.

did anyone face this same issue and know how to resolve it?

Do you have a config or .env file in your project.

If yes, that’s where the problem is coming from.

I don’t know the solution to your problem yet, but try checking your config or .env file if you have one

I have a similar problem, but I my case I found that it has to do with the google maps api, are you using it in your app?

Hi @alexandresjunior

Try going through the Debugging - Expo Documentation guide. Especially the part about production errors

the only additional file I’ve added besides the ones created by expo itself is the eas.json file just like the official documentation says:

{
    "build": {
        "preview": {
            "android": {
                "buildType": "apk"
            }
        },
        "preview2": {
            "android": {
                "gradleCommand": ":app:assembleRelease"
            }
        },
        "preview3": {
            "developmentClient": true
        },
        "production": {}
    }
}

Not the Google Maps API, but the react-native-maps. the other dependencies are listed below:

{
  "name": "sasb-compesa-mobile",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@expo/webpack-config": "^0.17.2",
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-navigation/bottom-tabs": "^6.5.3",
    "@react-navigation/native": "^6.1.2",
    "@react-navigation/native-stack": "^6.9.8",
    "axios": "^1.2.2",
    "expo": "~47.0.12",
    "expo-checkbox": "^2.2.2",
    "expo-image-manipulator": "~11.0.0",
    "expo-image-picker": "~14.0.2",
    "expo-location": "^15.0.1",
    "expo-network": "~5.0.0",
    "expo-print": "~12.0.0",
    "expo-secure-store": "~12.0.0",
    "expo-sharing": "~11.0.1",
    "expo-status-bar": "~1.4.2",
    "lottie-react-native": "^5.1.4",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-native": "0.70.5",
    "react-native-maps": "^1.3.2",
    "react-native-simple-radio-button": "^2.7.4",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "~0.18.9"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

Yeah, the problem is with react-native-maps, but I have not found a solution yet due to lack of time, if someone finds anything please share.

did you just remove the dependency and it worked?

@alexandresjunior the symptoms can be caused by any number of issues. Maybe removing react-native-maps might “work” for someone, but there’s a good chance that your issue is caused by something else.

You need to get more info about what’s happening.

Is your app able to work in Expo Go of a development build?
What if you run it in Expo Go or the development build, but when running npx expo start you run npx expo start --no-dev --minify?
What do you get in the device logs (adb logcat -d) when the app crashes?

See the Debugging Runtime Issues and Troubleshooting build errors and crashes docs.

I have the same issue here, and the biggest problem right now is that, it doesn’t log any problem whatsoever in development, even when you flag with --no-dev --minify.

Unfortunately if the debugging and the troubleshooting build errors and crashes guides don’t help, you’ll need to resort to fyi/manual-debugging.md at main · expo/fyi · GitHub

You might try creating a new app and then start copying parts of the real app to it until the problem starts happening. Alternatively, start removing/commenting out parts of your real app until the problem goes away. Or a combination of both. That should hopefully help you to narrow down where the problem is coming from.

hey, guys!! thanks for the help! it turned out the error was caused by the react-native-maps dependency. After looking into error logs using logcat, it was reporting the api key was missing (which I don’t have for now). So I just removed it and the app is not crashing anymore.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.