Screenshot from Android phone running the app
I am working on a react-native project and I run it on my android phone via USB debugging and the command "react-native run android".
It was working all fine but now even though the build is successful, the app gets stuck on the white screen "loading from localhost:8081". No changes were made in any of the app files.
I tried running the react-native demo app (using react-native init) and I still face the same issue.
Solutions I tried but still same issue:
- rm -rf node_modules && npm install
- adb reverse tcp:8081 tcp:8081
- Running it on Android Emulator from Android Studio.
- Using the command npm run android
This is what shows up in the command line:
lenovo@lenovo-Lenovo-ideapad-500S-14ISK:~/IRMSold$ react-native run-android Scanning folders for symlinks in /home/lenovo/IRMSold/node_modules (6ms) JS server already running. Building and installing the app on the device (cd android && ./gradlew installDebug)...
Configure project :app WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configure project :react-native-google-signin WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: The specified Android SDK Build Tools version (23.0.3) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.1. Android SDK Build Tools 27.0.3 will be used. To suppress this warning, remove "buildToolsVersion '23.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Configure project :react-native-vector-icons WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: The specified Android SDK Build Tools version (26.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.1. Android SDK Build Tools 27.0.3 will be used. To suppress this warning, remove "buildToolsVersion '26.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Task :app:installDebug Installing APK 'app-debug.apk' on 'Lenovo X3a40 - 6.0.1' for app:debug Installed on 1 device.
BUILD SUCCESSFUL in 13s 66 actionable tasks: 1 executed, 65 up-to-date Running adb -s 567bf688 reverse tcp:8081 tcp:8081 Starting the app on 567bf688 (adb -s 567bf688 shell am start -n com.irms/com.irms.MainActivity)... Starting: Intent { cmp=com.irms/.MainActivity }
Kindly help me out, as I tried every other fix I could find online.