Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed
I've seen this several times. Usually, it's due to having a signed release version on my phone, then trying to deploy the debug version on top. It gets stuck in an invalid state where it's not fully uninstalled.
The solution that works for me is to open a command prompt and type:
adb uninstall my.package.id
That usually completes the uninstall in order for me to continue development.
INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device
I just renamed the package and it worked for me.
Or if you are using Ionic, you could delete the application and try again, this happens when ionic detects that the app you are deploying is not coming from the same build. It often happen when you change from pc.
INSTALL_FAILED_UPDATE_INCOMPATIBLE shows up even after the original is completely removed
The solution is to modify the AndroidManifest.xml
file. You need to remove the sharedUserId
attribute in the second line.
The Reader.apk file is a system app, and it is made by the manufacturers of the device itself, who also made several other apps. Due to this, they were able to set the sharedUserId flag, which allows all of their apps to interact with each other. As a security design, all the apps are required to have the same signing key. When I tried to install the modified app, it failed to install because it was trying to share the user id with the other apps while lacking the proper signing key.
By removing the flag in the xml, you can successfully install the modified app. Change the following line in the AndroidManifest.xml
file from this:
<manifest android:sharedUserId="android.media" android:versionCode="1"
android:versionName="1.0" package="com.bn.nook.reader.activities"
xmlns:android="http://schemas.android.com/apk/res/android">
to this:
<manifest android:versionCode="1" android:versionName="1.0"
package="com.bn.nook.reader.activities"
xmlns:android="http://schemas.android.com/apk/res/android">`
See this xda post for more details. (Full Disclosure: I wrote that post.)
Installation failed with message INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match the previously installed version
There are two possibilities I can think of
- You use Google Play App Signing. If you use Google Play App Signing then the signature in apps coming from Google Play will always be different to the app coming from your IDE. The only way you can get the update to work is to update the app from Google Play. The best way to do this during development is to use an "Internal test track". Google launched these at Google I/O this year and they let you update your app in seconds from Google Play. So when you have an update, don't install from your IDE, upload to Google Play internal test track, republish, and then update from Google Play. It is really quick.
- You don't use Google Play App Signing, but you are trying to install your debug build instead of your release/production build. Make sure you are building the production release APK, so it is signed with the same key as the one uploaded to Google Play.
Failure [INSTALL_FAILED_ALREADY_EXISTS] when I tried to update my application
If you install the application on your device via adb install
you should look for the reinstall option which should be -r
. So if you do adb install -r
you should be able to install without uninstalling before.
INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device
I just renamed the package and it worked for me.
Or if you are using Ionic, you could delete the application and try again, this happens when ionic detects that the app you are deploying is not coming from the same build. It often happen when you change from pc.
Related Topics
Mvvmcross Changing Viewmodel Within a Mvxbindablelistview
Android.Os.Networkonmainthreadexception . Need to Use Async Task
How to Show Daily Offline Notifications in Android 10
How to Filter the Data in Realm Adapter
Implement Double Click for Button in Android
Calledfromwrongthreadexception
Java.Lang.Noclassdeffounderror: Org.Ksoap2.Serialization.Soapobject
"File Not Found" Exception in Dexdebug Task of Build
Android Home Screen Widget (Icon, Label - Style)
Recycle-View Inflating Different Row :- Getting Exception While Binding the Data
How to Display Map (Google) on a Phonegap Android Application
Error Building Player: Commandinvokationfailure: Unable to Convert Classes into Dex Format
Advantages of Using Bundle Instead of Direct Intent Putextra() in Android