APK Installation Problems
This section covers problems that occur after Gradle successfully builds the APK, but React Native fails while installing it on the Android device.
Problem 1 — InstallException: EOF
Example:
> Task :app:installDebug FAILED
[Device]: Error during Sync: EOF
com.android.ddmlib.InstallException: EOF
Caused by: java.io.EOFException: EOF
at com.android.ddmlib.SyncService.doPushFile(...)
This means the APK was built successfully, but ADB failed while transferring/installing the APK on the device.
The important part is:
Error during Sync: EOF
and:
SyncService.doPushFile
This is usually an ADB/device communication or device-side installation problem, not a React Native JavaScript problem.
Step 1 — Check whether the device is still connected
Run:
adb devices
Expected:
List of devices attached
192.168.x.x:5555 device
If it shows offline, restart ADB:
adb kill-server
adb start-server
adb devices
If using wireless ADB, reconnect:
adb connect PHONE_IP:5555
Step 2 — Try installing the APK manually
First make sure the APK exists:
android/app/build/outputs/apk/debug/app-debug.apk
Then install it manually:
adb install -r "C:\\android\app\build\outputs\apk\debug\app-debug.apk"
If it succeeds:
Performing Streamed Install
Success
then:
- APK was built correctly
- Android SDK is working
- ADB can communicate with the phone
- APK installation itself works
This is a very useful diagnostic test.
Problem 2 — Requested internal only, but not enough space
Example:
Requested internal only, but not enough space
This means the phone does not have enough internal storage to install the APK.
It is generally not a React Native code problem, Gradle problem, Android SDK problem, Metro problem, or Wi-Fi problem.
Check phone storage
You can use:
adb shell df -h /data
If the available space is very low, free storage on the phone. Remove or move:
- Large videos
- Downloads
- WhatsApp media
- Unused applications
- Old APK files
- Other large files
Then try:
npx react-native run-android
Problem 3 — Installation works manually but run-android fails
Sometimes this works:
adb install -r "C:\\android\app\build\outputs\apk\debug\app-debug.apk"
but:
npx react-native run-android
fails during installation.
If manual installation succeeds, check the ADB connection used by React Native/Gradle.
Run:
adb devices -l
Then verify the exact device serial. Example:
192.168.1.15:5555 device
You can also start the application manually:
adb -s 192.168.1.15:5555 shell am start -n com.yourapp/.MainActivity
If the app opens, the APK installation is working.
Problem 4 — more than one device/emulator
Example:
adb.exe: error: more than one device/emulator
This happens when ADB sees multiple devices/emulators.
Check:
adb devices -l
Example:
List of devices attached
emulator-5554 device
192.168.1.15:5555 device
Specify the device explicitly:
adb -s 192.168.1.15:5555 install -r "C:\\android\app\build\outputs\apk\debug\app-debug.apk"
For other ADB commands:
adb -s 192.168.1.15:5555 shell
adb -s 192.168.1.15:5555 reverse tcp:8081 tcp:8081
If adb devices -l shows only one device but ADB still reports more than one device/emulator, do not immediately assume that there are actually two phones. Check for multiple ADB installations/processes.
where adb
For example:
C:\Users\\AppData\Local\Android\Sdk\platform-tools\adb.exe
C:\scrcpy-win64-v3.3.3\adb.exe
Also check:
tasklist | findstr /i "adb scrcpy"
If necessary, close applications using ADB, such as:
- Android Studio
- scrcpy
- VS Code terminals running ADB commands
- Other Android debugging tools
Then restart ADB:
adb kill-server
adb start-server
adb devices -l
Problem 5 — adb reverse fails
React Native normally uses port 8081 for Metro.
For a USB-connected device, you can use:
adb reverse tcp:8081 tcp:8081
For a wireless device:
adb -s PHONE_IP:5555 reverse tcp:8081 tcp:8081
Example:
adb -s 192.168.1.15:5555 reverse tcp:8081 tcp:8081
If you receive:
adb.exe: error: more than one device/emulator
check:
adb devices -l
and investigate multiple ADB connections/processes.
Problem 6 — App installs but shows Unable to load script
Example:
Unable to load script.
If you're using USB on a physical device, make sure you
also run this command:
adb reverse tcp:8081 tcp:8081
This means the APK was installed and launched, but the React Native application cannot reach the Metro development server.
This is different from an APK installation failure.
First check that Metro is running:
Welcome to Metro v0.84.4
INFO Dev server ready.
Then check:
adb devices
If the device is connected, try:
adb -s PHONE_IP:5555 reverse tcp:8081 tcp:8081
Problem 7 — Metro says No apps connected
Example:
INFO Reloading connected app(s)...
warn No apps connected.
This means Metro is running, but it does not currently detect a React Native app connection.
First check:
adb devices
The phone should show:
PHONE_IP:5555 device
Then make sure the application is actually running on the phone.
If necessary, launch it manually:
adb -s PHONE_IP:5555 shell am start -n com.yourapp/.MainActivity
Problem 8 — Browser works but React Native still cannot load Metro
If opening http://PC_IP:8081 on the phone shows the Metro page, that proves the phone can reach the computer over the network.
For example, if the PC's Wi-Fi IPv4 address is 192.168.1.14, the phone can try:
http://192.168.1.14:8081
If this opens successfully:
- Phone can reach the PC
- Port
8081is reachable - Metro is running
If React Native still shows Unable to load script, then investigate the React Native/ADB connection configuration rather than assuming the router is blocking Metro.
Problem 9 — Wi-Fi/router prevents Metro access
If the phone cannot open http://PC_IP:8081, check:
A. Same network
The phone and PC should normally be connected to the same LAN. Example:
PC: 192.168.1.14
Phone: 192.168.1.15
Both are on 192.168.1.x with subnet mask 255.255.255.0.
B. Windows Firewall
Windows Firewall can prevent other devices from accessing Metro. Make sure Node.js/Metro is allowed through the Windows Firewall, or allow the required connection when Windows asks.
C. Router client isolation
Some routers have features such as:
- AP Isolation
- Client Isolation
- Wireless Isolation
These can prevent devices connected to the same Wi-Fi from communicating with each other. If the phone and PC cannot communicate directly, check the router settings.
Problem 10 — Manually install APK to separate the problems
This is one of the most useful troubleshooting techniques.
Build the APK:
npx react-native run-android
If the command fails specifically at :app:installDebug, try installing the generated APK manually:
adb install -r "C:\\android\app\build\outputs\apk\debug\app-debug.apk"
If manual installation succeeds
The APK itself is valid and installation works. Focus on:
- React Native CLI
- Gradle install task
- ADB device selection
- ADB connection
adb reverse
If manual installation fails
Read the exact ADB error. For example:
not enough space→ Free phone storage.device offline→ Fix ADB connection.INSTALL_FAILED_...→ Investigate the specific Android package/install error.
APK Installation Troubleshooting Flow
Important Diagnostic Rule
Do not treat every run-android failure as a build failure. There are three separate stages:
For example, BUILD SUCCESSFUL followed by Unable to install app means the build succeeded but installation failed.
Likewise, BUILD SUCCESSFUL and App launches followed by Unable to load script means the APK installation succeeded and the problem is now Metro connectivity, not APK installation.
Quick Commands (APK)
Check connected devices
adb devices -l
Restart ADB
adb kill-server
adb start-server
Install APK manually
adb install -r "C:\\android\app\build\outputs\apk\debug\app-debug.apk"
Check phone storage
adb shell df -h /data
Set up Metro reverse
adb -s PHONE_IP:5555 reverse tcp:8081 tcp:8081
Start the application manually
adb -s PHONE_IP:5555 shell am start -n com.yourapp/.MainActivity
Most important rule: Always read the actual error at the bottom of the installation step. Warnings such as Gradle deprecation messages are usually unrelated to an APK installation failure. In the previous troubleshooting case, the real installation problem was insufficient internal storage on the device, not Gradle or React Native.