react-native :app:installDebug FAILED –
The APK debugging installation failed on my device.
jianglinghuadeMacBook-Pro: hello jianglinghua$ react-native run-android
The JS server is already running.
Build and install the application on the device (android cd & & ./gradlew installDebug…
WARNING [Project: :app] The current NDK support is deprecated. An alternative will be proposed in the future.
Installing APK ‘app-debug.apk’ on ‘MI NOTE LTE – 6.0.1’
Unable to install /Users/jianglinghua/Desktop/hello/android/app/build/outputs/apk/app-debug.apk
com.android.ddmlib.InstallException: Error when installing session.com.android.ddmlib.Device.installPackages (Device.java: 894) ……… at org.gradle.wrapper.GradleWrapperMain.main (GradleWrapperMain.java: 61):app:installDebug FAILED
SAFETY : The design failed with one exception.
The ‘:app:installDebug’ task failed.
> com.android.builder.testing.api.deviceException: com.android.ddmlib.InstallException : The session could not be established
Execute the –stacktrace option to get a stack trace. Use the –info or –debug option to get more output data.
Total duration: 13.945 sec
The application could not be installed on the device, see the error above for details.
Make sure the Android emulator is running or the device is connected and
has configured your Android development environment:
I look at my cameras
jianglinghuadeMacBook-Pro: hello jianglinghua$ show devices
device list attached
How can I solve this problem?
Since you are using a mi phone that has ….. has…
Go to development options, scroll down to enable and disable MIUI optimization. Your phone is rebooted
look at sb./sth.
If you are using another Android phone with a custom user interface/name on top of the Android operating system, try disabling and checking the optimization of this interface.
(This information is usually found under Developer Options).
I had that question. Mine worked fine on the emulator, but not on the device, and the error was
If you have another application with the same name (or package name) on the device:
Rename the application or remove it from your device.
In my case I installed a new application but I had an error, I tried different ways and possible answers from github and stackoverflow.
The solution for me was … Check if you already have an application with the same name installed on Android…..
Remove old applications and run a reactive run-android
It worked for me.
On my Android device, the problem was in previous versions of the application I had previously installed on my phone.
the following steps solved my problem:
- Removal of all previous versions of the application, including the debug version and the signed apk version.
- in the root directory of your project, run (under Windows) :
The thermometer is clean
npm pure cache – Performance
- Restart the Android device
I hope this helps you too.
Solution no. 5:
I have the same problem and did some research. This problem is common with Chinese Android phones.
Fixed the problem by changing the gradle version to 1.2.3 in the android/build.gradle file on line 8.
Solution no. 6:
Works for me.
- To remove an application from your phone
- Android CD
- Sorting machine
- run-android-reactive navigation
Solution no. 7:
- Go to android/build.gradle, edit
- Then go to
change theURL distribution to https://services.gradle.org/distributions/gradle-2.2-all.zip.
- Run it again.
Solution no. 8:
If none of the above works, try the following steps to start the cold emulator
Open the AVD Manager -> Edit Device -> Show Advanced Settings -> Boot Option -> Cold boot instead of Fast boot.
Solution no. 9:
In my case (using React Native), my Android phone was not recognized by my PC where I was running the server, which can be seen in the post :
The ‘:app:installDebug’ task failed.
> com.android.builder.testing.api.deviceException : No online devices found.
If this is the case, as described in the ADB Android Device Unauthorized section, make sure your phone’s Developer Options section has USB debugging set to true, and type the following commands in the restart command for the Android device or server.
And promotional devices should list your phone as a device, not an unauthorized device.
Solution no. 10:
In my case, I downloaded the application from the PlayStore and tried to debug the APK with the same name. I just uninstalled the application and successfully debugged it.
app:installdebug stuck, react-native error device offline, react native run android device is null, avd settings, bash: .gradlew: command not found, how to enable use host gpu in android studio, app:validatesigningdebug react-native, npx react-native run-android, react native cli, install_failed_version_downgrade react-native, task :app:mergeextdexdebug failed, gradlew clean, adb devices unauthorized, unable to locate adb, checkexecsyncerror react-native, command failed: gradlew bat build lint, react-native run-android stuck, 26 actionable tasks 1 executed 25 up to date, 27 actionable tasks 2 executed 25 up to date, base.apk code is missing, install_failed_invalid_apk, install_failed_update_incompatible, install_failed_version_downgrade, error: command failed: gradlew.bat app:installdebug -preactnativedevserverport=8081, execution failed for task ‘:app:installdebug’ no connected devices, execution failed for task ‘:app:packagedebug react-native, gradlew installdebug, react native run-android, task :app:mergedexdebug failed