How to solve com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE - android

I am using Mi Note3, before that, I can run the code from react-native using react-native run-android and connect with my phone. Now cannot already. My MIUI version is 10.2, I already open Developer options, USB debugging, Install via USB and turn off the MIUI optimization.

This happens when you try to update a signed release build with a debug build for instance. apk cannot be installed because its signature is incompatible with the currently installed version.The solution is to uninstall the existing app from the device.

Uninstall application once and then run command react-native run-android after connecting device.

Related

Android Studio: Installation failed due to: 'device 'xxxxxxxx' not found'

I'm struggling with an issue connecting Android Studio to my Google Pixel 2.
When I plug my phone into my laptop, Android Studio now recognizes the physical device and shows 'Google Pixel 2' in the dropdown of devices to run the app on. When I go to run the app, it compiles without error but when it tries to install the app on my phone the connection between my phone and AS is lost (the device is no longer listed in the dropdown) and this error message is shown in the Run dialog:
06/12 17:08:35: Launching 'app' on Google Pixel 2.
Installation did not succeed.
The application could not be installed.
List of apks:
[0] '/home/kirk/Apps/xxxx/android/app/build/outputs/apk/debug/app-debug.apk'
Installation failed due to: 'device 'xxxxxxxx' not found'
Retry
Clicking the Retry link just results in it being launched in an emulator.
I've tried disconnecting and reconnecting the device, revoking the USB debugging authorisations then re-trusting my computer, as well as closing and re-opening Android Studio.
Any ideas?
Android Studio–>Preferences–>Build,Execution,Deployment–>Debugger–>“Use libusb backend”, select false–>Apply–>Ok
Sometimes ADB just need a restart.
adb kill-server
adb start-server
In my case I had a plugin to connect via wifi, like:
Android WIFI ADB
Try to uninstall this type of plugin then clean Android Studio on Invalidate Caches / Restart...
This happened to me when I was sharing Wi-Fi from my PC to the phone.
When I disconnected my phone from my PC's Wi-Fi, everything worked.
It could be an issue with ADB rather than Android Studio
I think it is problem with adb not with android studio I tried updating adb it worked for me. Try once

How to install an Android app on my device through macOS using Flutter

After creating the release APK file into my app, I should follow the next lines to install an APK on a device:
Connect your Android device to your computer with a USB cable.
Enter cd <app dir> where <app dir> is your application directory.
Run flutter install
The problem I find, macOS doesn't recognize my device as external disk. I must do it through https://www.android.com/filetransfer/
Any solution?
Thanks for all.
You have to have USB-Debugging turned on on your device!
The following allows you to automatically build and start the app in release mode on your device or emulator.
flutter run --release
The easiest way to install an apk on your device manually is
adb install your_apk_file.apk

Debug with Xiaomi mi5 MIUI 8 Android Studio

I cannot launch app from Android Studio. When i click "run", I select my device:
And it appears an the following message:
But it is not true, the app is not installed in the device. In the "run" console, appears the following:
04/22 15:53:08: Launching app
$ adb install-multiple -r C:\Users\User\AndroidStudioProjects\some.apk
$ adb shell pm uninstall com.package.app
Unknown failure (Failure - not installed for 0)
Error while Installing APK
I have activated USB debugging in the device.
Try TURN OFF "MIUI Optimization" from developer options.
I've updated to MIUI 8.2 and encountered same problem, found the solution here and it works. Good luck!
http://c.mi.com/thread-171377-1-0.html
[Off-Topic] [Device Team] Fix For Unable to Debug Android App From Android Studio
#Fisherman's answer haven't worked for me.
I needed also to uncheck Verify apps over USB and it worked like a charm.

Android app installation: Unknown failure (Failure - not installed for 0)

Application works fine on emulator, but I can't launch application on my device (Xiaomi Mi4). At first i seed dialog with such text:
Installation failed with message Failed to establish session.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
But after I agree - i see in log this message:
Launching app
$ adb install-multiple -r <....>
$ adb shell pm uninstall com.example.app.debug
Unknown failure (Failure - not installed for 0)
Error while Installing APKs
I've rebooted device several times and plugged/unplugged it to computer, but nothing helped.
For Redmi and Mi devices turn off MIUI Optimization and reboot your phone.
Settings > Developer Options > MIUI Optimization
Problem is in Instant Run.
As Chirag Shah said - on Xiaomi devices you can disable MIU optimization - it worked for me too when I tried.
Another solution is to disable Instant Run in android studio settings.
I've remembered - I had this problem some time ago on windows, but now it occured on linux(ubuntu). I've wrote bug report to google, but problem is still here (first time it was Android studio 2.2.3 and now it is 2.3).
For convenience:
To disable Instant Run go to
File->Settings->Build, Execution, Deployment->Instant Run
Only Turning on "Install via USB" in Developer options did the work for me. Otherwise you may need to turn off MIUI Optimization and reboot again, but try the USB option first.
I solved my problem by following the steps bellow
Turn off Developer options.
Turn on Developer options again.
Turn on USB debugging
Turn on Install via USB
After following the steps I run from android studio and it was installed my app successfully.

Android Studio is not installing app into device

My device is running android Lollipop 5.1 with Developers Options enabled and USB Debugging option checked. When I hit the RUN button on Android Studio it shows the following in the event log:
Target device: qmobile-lt500-D5180B1R63091071
Installing APK: C:\Users\Umair\AndroidStudioProjects\MyApplication\app\build\outputs\apk\app-debug.apk
Uploading file to: /data/local/tmp/com.example.umair.myapplication
Installing com.example.umair.myapplication
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.umair.myapplication"
And then nothing happens. App doesn't install and open. When I click on Android Monitor, it shows events on logcat, my device name etc. confirming that it is properly connected.
Someone tell me where the problem is.
In your mobile check unknowns sources apk install on/off
And make sure in your device space is available
First uninstall app from your device if you've already installed it.
Then in your IDE do clean and rebuild,and try restarting the device and also restarting your IDE.
That should work as expected now

Categories

Resources