INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device
Asked Answered
K

32

327

I've compiled Trebuchet launcher from CyanogenMod 9, and trying to install it with adb:

$ adb install out/target/product/generic/system/app/Trebuchet.apk
3986 KB/s (7870141 bytes in 1.928s)
    pkg: /data/local/tmp/Trebuchet.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

I tried on Nexus S with CM9 and Galaxy Nexus with stock JB. Why I'm getting this error?

EDIT: In my case I've tried to reinstall system package with package manager. That's not supported, so I've got this error. Source of the error may differ in your case.

Knighthood answered 9/8, 2012 at 20:58 Comment(1)
on some latest devices having multiple users facility, check if the app is installed for other users(i.e. guest login). A tester in my company was struggling with this issue for hour, when he came to me, it took 5-10 minutes also for me, to find out that the same app was installed under different guest login in that device, so wasn't getting shown on home screen or not even in settingsCataldo
K
8

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.

Knighthood answered 11/8, 2012 at 0:58 Comment(4)
Nothing else worked for me. Thanks for the great idea!Kikuyu
Too much work, I'd backup and remove apk and reinstall it.Sidhu
didn't work on Android 6.0.1. Had to delete the app on the device and reinstall the same package.Fantasist
"I just renamed the package", this is not work around, in fact you are creating another application!Dolorisdolorita
H
545

it means the application which you want to install is already installed. just remove the old one and try again.

Hemotherapy answered 31/10, 2012 at 15:0 Comment(10)
Worked for me, but I also had to reboot once too.Bacciferous
I had to go into Settings -> Manage Applications to find the app and choose to Uninstall it from there as it wasn't showing up elsewhere.Woodford
May also be require you to uninstall from all user accounts (my Nexus 10 had 3 users).Petro
Go to apps -> Internal memory -> uninstall the old build does the trick.Attain
Also tried this unsuccessfully: ./adb install -r Trebuchet.apk Real problem was that the app was installed for another user.Nasser
I factory reset my phone, and it still comes up with the same error when I try to install the apk.Hubbard
its and issue..you can't just delete the existing app and reinstallInhabitant
Or try: adb install -r my.apkSloop
what if I just try to do an update of an existing app? this would remove everything my last app saved locallyKing
Just to add a little more for me is what that I tried to install a debug over a release version of my app which caused the issue.Utile
S
215

Try

adb uninstall package-name

It works for me. I have remove my app using Titanium Backup. However,I think Titanium backup didn't removed my app totally.

Shaunda answered 12/4, 2014 at 11:7 Comment(10)
I noticed the same thing using DevDrawer. This worked.Wellordered
Thanks! This saved me from a huge unexplainable headache. Not sure how I got in this state... I'm debugging an app in Xamarin Studio and Visual Studio and it was working fine until it wasn't... oh well.Levigate
When all else on the accepted answer failed...this worked.Mantilla
Great! Simple and easy. No need do reboot with this solution.Bedwell
It works for me. Before I tryied manual uninstall and reboot and nothing change, only with adb command it works. Thank you.Cadenza
It happened to me when I uninstalled my debug app manually via Settings. And wanted to install new app with different signature (from friends computer and/or signed with my release key). Uninstalling it again from command line was successful. Thanks for your tip.Hedberg
If you have multiple plugged devices, use adb devices to list all the available devices and then run the following command : adb -s [DEVICE_ID] uninstall package-nameHydrology
works for me too. I was having this error even after uninstaling the app normally, this solved itAphrodisiac
at least give us an example! it's not clear what the package-name should look like. in my case com.tapastalk.keyboard.konjugationkeyboard worked. you can use adb to list all the packages.Raisin
Worked for me: I had already uninstalled the app from the device, but somehow adb uninstall seems to have removed more remnants. No reboot needed.Periodicity
D
115

Uninstalling the application would be enough to avoid this problem.

INSTALL_FAILED_UPDATE_INCOMPATIBLE

but sometimes even uninstalling the message is raised again, it occurs in Android OS 5.0 +, so this is the solution:

Go to Settings > Apps and you will find your app with the message:

"Not installed for this user" enter image description here

We have to uninstall manually for all users!, then we can install our compiled application with no problems.

enter image description here

Another options:

  • Remove the old application and install again.

  • Use Android Debug Bridge command:

    adb uninstall [PACKAGE NAME]

Dolorisdolorita answered 21/9, 2015 at 18:18 Comment(10)
Thank you! This is what I needed. Why and when did they start doing it this way?Imprisonment
apparently since OS 5.0 +Dolorisdolorita
Initially, I couldn't find my uninstalled app under Settings -> Apps. It turned out that in Lollipop 5.1.1, the uninstalled app was listed by the package name, not the app name. So, if you did an adb uninstall, and adb install still fails, look for your uninstalled app under your package name. So, com.acme.wileycoyote will be listed alphabetically under "c", not "w".Hurlyburly
Thanks, that works! My phone doesn't have the option "Uninstall for all users", I uninstall it by logging in all users...Venation
Note that the app is listed at the very bottom irrespective of the alphabetic ordering !!Alphonsa
Just needed to remove the old application and install again. ThanksToner
What "all users" when the user is exactly one - ME!!! Anyway, it works - upvoted.Pasol
I've found the cause. This happens for apps installed through the IDE or adb and then uninstalled through the device.Pasol
Your 'uninstall manually' solution, worked for me, after trying many other solutions. I also restart the phone after uninstalling manually.Cancan
adb uninstall command worked.Benedic
W
23

Two ways that can be works

1: Uninstall app from mobile device manually

2: Open command prompt , trace path of adband execute following command

adb uninstall your_package_name
Woad answered 8/4, 2015 at 7:31 Comment(2)
The only way which works for devices without display.Hasdrubal
eg : "adb uninstall net.gavin.hello" where package name is on AndroidManifest.xml as "package="net.gavin.hello""Antigone
R
9
  1. go to : your adb folder \sdk\platform-tools\
  2. type cmd
  3. type : adb remount on command window
  4. adb shell
  5. su
  6. rm /system/app/YourApp.apk
  7. Restart your device
Recurvate answered 6/2, 2014 at 7:3 Comment(3)
what does remount? can I using this keep release and debug version and mount and remount them easily?Rooky
Doesn't make much sense as user apks are not stored in /system/app but /data/appCicily
@Rooky adb remount remounts system partition as read-write instead of default read-only.Cicily
O
9

The question was why he's getting this error. Uninstalling will solve this problem but in my case, while I was installing the compiled version of the apk, the problem raised. I was trying to build an update for my application. So what I did, I built a signed apk and then tried to install the apk and the apk installed perfectly. So, rather removing the old apk, I had to sign the newer update and then installed it.

Outshine answered 21/2, 2016 at 12:49 Comment(1)
Same here. Try to test the update process. So uninstall is not an option.Dematerialize
K
8

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.

Knighthood answered 11/8, 2012 at 0:58 Comment(4)
Nothing else worked for me. Thanks for the great idea!Kikuyu
Too much work, I'd backup and remove apk and reinstall it.Sidhu
didn't work on Android 6.0.1. Had to delete the app on the device and reinstall the same package.Fantasist
"I just renamed the package", this is not work around, in fact you are creating another application!Dolorisdolorita
B
7

This maybe because you have more than one user in your device and you've just deleted the app on one (leaving the apk still present for the other(s)).

I've deleted in all accounts, and it worked afterwards.

Beeves answered 12/5, 2015 at 17:14 Comment(2)
Do you mean Google accounts?Tamer
Yes, exactly what i mean.Beeves
E
7

This can happen if you sign your application with a different certificate. You can always use

adb install -r myapk.apk

to overwrite an existing apk on your device, but you will still get the error if you signed the new apk with a different certificate that of the installed apk.

In that scenario you would need to uninstall the apk from your device before attempting an install. However, this can also impact your application since your original signing may be tied to certain Developor API's, so you may need to update the console with your new credentials.

Esposito answered 21/6, 2018 at 10:31 Comment(0)
T
4

If your device supports multiple users, you might have to delete the app for each account as well.

I usually use adb and that does the trick adb uninstall <your-package-name>

Terrence answered 17/7, 2015 at 1:33 Comment(0)
L
4

if the APK is built in project with Android.mk file. Maybe it's because of the sign certificate has been changed.

in my problem, I have add LOCAL_CERTIFICATE := platform. as the original apk is signed without this tag.

Lodie answered 31/7, 2016 at 8:59 Comment(1)
This is really a comment, not an answer. With a bit more rep, you will be able to post comments.Twigg
D
4

This might be Raised When the Application installed in you device as Different Signature then the Application(apk) you are Trying to install.(in easy words, earlier application is build by "System-A " and now build a Application By "System-B" and trying to install) You can solve this Issues in one or the other ways as showed Below.

Option 1:

   Uninstall the Application in your Device and install the New APK

Option 2:

Note: this option is applicable only if you have the Access to both old and new Systems via which Apk are build respecitively

if you don't want to Remove the APk or its not Allowed then you can get the Debug key, System-A and the same Debug to System-B

steps to take the Debug Key form "System-A"

Go to Terminal enter

./gradlew signingReport

you will get to know your results as Below

Variant: debug Config:
debug Store: /home/user/debug.keystore
Alias: AndroidDebugKey
MD5: CS:7B:E3:51:C5:2E:36:AA:3F:66:BA:ED:40:DB:86:25
SHA1: 2A:BB:C5:4E:64:4E:FE:12:4C:4E:2B:4E:4E:42:4E:4E:4E:4E:63:83
Valid until: Wednesday, May 6, 2048

get the "debug.keystore" file from the location showed above and transfer it to "System-B" then goto

    Android studio >> File >> Project Structure >> SigningConfigs
    set the location of the "debug.keystore" to Store File and then ok

Now build the Apk in your "System-B" and Run it will work

Damico answered 30/6, 2020 at 10:31 Comment(0)
E
3

I installed Astro file manager and searched for a previous version of the apk-file, found one on the sdcard and deleted the apk-file using Astro file manager.

Exteroceptor answered 10/10, 2012 at 12:0 Comment(0)
K
2

In my case there was no version of the App I could find through device manager or Astro.

What I ended up doing was:

1) Download the latest version of the App from the app store

2) The app was still not visible in device manager until I restarted my device.

3) Remove the app from device manager

4) Run my project again

5) Everything works

Hope this helps someone

Kyd answered 23/10, 2014 at 1:45 Comment(0)
P
2

C:\android-sdk\platform-tools\adb.exe: Command failed with exit code 1

Error output: adb: failed to install app\platforms\android\app\build\outputs\apk\debug\app-debug.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example.app1 signatures do not match the previously installed version; ignoring!]

Solution:

You already have the app app1 installed on phone (mostly download from play console, or upload key is changed)
Uninstall the app.

More details:

It's possible that you already have this app uploaded to play store using upload key, play console applied its own signature to it. That's why the app in your phone downloaded from google play does not have the same signature of your upload key.

By uninstalling app, there is no play store version of app, so mis-matches when you install a new version to you phone.

Hope that helps.

Polyhistor answered 9/3, 2019 at 3:44 Comment(0)
A
2

Samsung Galaxy Phones has a feature Known as Secure Folder Removing App from That Solved The problem for me.

also adb uninstall packagename can Not remove App from Secure folder.

Aegean answered 28/12, 2019 at 14:43 Comment(0)
G
1

Go to Setting/Apps/ Search for your app and unistall...

It´s worked for me

Gametocyte answered 7/4, 2015 at 21:43 Comment(0)
R
1
  1. Go to Setting/Apps/ Search for your app and uninstall...
  2. open command prompt and "adb uninstall "

It´s worked for me

Repossess answered 8/8, 2015 at 16:57 Comment(0)
B
1

In my case, I have installed Application from Playstore and after when I am trying to run from Eclipse or Android Studio so it will try to install again on that APK that will not allow.

So First of all you have to Uninstall that Siged APK and after that you have to try.

Thank you.

Berghoff answered 23/11, 2015 at 6:43 Comment(0)
B
1

For MIUI users, apart for usual USB debugging option be sure to enable these settings as well:

Install via USB
USB debugging(Security settings)

then accept the prompt when you try installing app again.

Bibliopole answered 11/1, 2017 at 20:37 Comment(0)
C
1

I got the same issue and did following to fix it.

  1. Settings > Storage > Clear Cached Data
  2. Settings > Apps > Uninstall the apps showing there. I had uninstalled my apps but it was showing there.
  3. Restart and then everything went fine.
Cestar answered 30/12, 2017 at 14:2 Comment(1)
The 2nd point helped. In my case the app wasn't installed for current user but was installed for other users. So, I clicked on the app in Apps list and inside the details page, clicked on More button (three vertical dots). There, it had an option 'Uninstall for all users'. That did it for me. Thanks!Westernism
G
1

I just spent an hour trying to debug this and then realised that i was connected to my emulator instead of my phone. So even though i had succesfully deleted the app on my phone it was still failing. Stupid mistake but maybe this will help someone else.

Gascony answered 8/7, 2019 at 19:8 Comment(1)
Doing the same stupid mistake but opposite to what you are doing. I was trying to install on my emulator while my phone was also connected.Ehrman
S
1

You have to sign your application and then run it!

If you are preparing a new update for your application, it is not a problem to continue working. In the end, before releasing the prepared version, when you sign the application, the problem will be solved and users will have no problem installing your application.

Surroundings answered 11/8, 2020 at 20:46 Comment(0)
M
1

In my case I'm getting this error but the app is not showing in the emulator. In that case try uninstalling apk useing adb command

adb uninstall <package-name>
Marlow answered 2/9, 2022 at 8:52 Comment(0)
A
0

RankoR@ you must have installed the application from a different computer. in my case thats where the problem arose .. all you need to do is just uninstall the application and reinstall it or run it from the computer you are working .. this might be a late reply but it will help some one .. thanks

Amerce answered 17/2, 2016 at 7:4 Comment(0)
R
0

It happened to me when I installed a dev build using Instant Run, and uninstalled from Google Play. For some reason the data from Instant Run is still in the device and can't install/uninstall the app again.

Only way to fix it: - disable Instant Run in android studio - install from android studio (it should work only from here) - uninstall app

now it should be clean to install from Google Play or adb.

Rescission answered 14/1, 2018 at 16:29 Comment(0)
D
0

its occurred if you build your apk from some other PC and update it from different PC.

Dervish answered 26/3, 2018 at 10:29 Comment(2)
What is the solution for this case?Frowzy
Copy debug keystore file from old computer to new computer.Amandie
P
0

If your Manifest file has this line -

android:sharedUserId="android.uid.system"

is causing this error! just comment this line and you are good to go!!

Pundit answered 25/6, 2018 at 15:43 Comment(0)
F
0

I don't see anyone mentioning my case so let me add it - it happens when you build the app in one mode (e.g. Dev) and then try to override it with a different mode (e.g. Production).

The solution is the same as for the other cases - delete the app on the device/simulator and run again.

Fitzsimmons answered 24/10, 2019 at 10:45 Comment(0)
A
0

If you are attempting to debug from a different computer than you were originally you will get the dreaded INSTALL_FAILED_UPDATE_INCOMPATIBLE error. However, there is a way to proceed without uninstalling the app and losing your data.

To see how to transfer the debug.keystore that is required so you don't get the message "The device already has an application with the same application but a different signature. In order to proceed you will have to uninstall the existing application." (and lose your data). See Update the app in another machine with same debug.keystore in android

Attenuant answered 29/10, 2019 at 15:48 Comment(0)
E
0

you just run adb uninstall {{package_name}}. That's it. Now you try the build.

Emogene answered 23/10, 2020 at 5:21 Comment(0)
S
0

WORK PROFILE / WORKSPACE

enter image description here

Don't forget that, depending on which user account you have on your phone (like a Google Workspace -G Suite Account profile with Device Management set to advanced) may generate a Workprofile to your phone.

90% of people have it but don't even know it. You normally see the Workprofile on the All app view. Is litterally like a separate workspace with separate Apps.

You can recognize when you are browsing app from Workprofile if they have a little lock of luggage. Anyway :

You must delete the App from the Workprofile As well!!!

Scarrow answered 9/8, 2021 at 13:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.