'Expo app runs on ios and emulator but not on android device
The Expo app will build and run correctly on ios simulator, ios device, and android emulator. but when I build an apk and run on an android device the app freezes after login and will not respond. I'm fairly new to react-native and development in general so I'm not sure what I would be doing wrong?
Solution 1:[1]
I had this issue with my code. It wasn't login related, but rather because I was using Google Maps API and I didn't have an API key set in app.json for Android.
https://github.com/brentvatne/growler-prowler/commit/3496e69b14adb21eb2025ef9e0719c2edbef2aa2
Solution 2:[2]
Are you running the app on debug or release? You can trace the error using logcat on Android Studio or using react-native log-android in a terminal window. That should show you the error message. There are many ways to understand what is happening after you login. Check out https://facebook.github.io/react-native/docs/debugging
You can also show us some code, getting your login code would help shed some light on what is going on.
Solution 3:[3]
The comment of @letsGITstupid helped me out to figure out the issue, that's why +1.
However, the real problem was lack of API key in the AndroidManifest.xml
:
<meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_KEY"/>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | letsGITstupid |
Solution 2 | Tony Olendo |
Solution 3 | Daniel Danielecki |