INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device

北战南征 提交于 2019-11-26 05:16:09

问题


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.


回答1:


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




回答2:


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.




回答3:


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"

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

Another options:

  • Remove the old application and install again.
  • Use Android Debug Bridge command:

    adb uninstall [PACKAGE NAME]




回答4:


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



回答5:


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.




回答6:


  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



回答7:


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.




回答8:


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.




回答9:


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.




回答10:


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>




回答11:


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.




回答12:


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.




回答13:


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




回答14:


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

It´s worked for me




回答15:


  1. Go to Setting/Apps/ Search for your app and uninstall...
  2. open command prompt and "adb uninstall "

It´s worked for me




回答16:


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.




回答17:


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.



回答18:


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.




回答19:


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.




回答20:


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




回答21:


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.




回答22:


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




回答23:


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!!




回答24:


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.




回答25:


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.




回答26:


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



来源:https://stackoverflow.com/questions/11891848/install-failed-update-incompatible-when-i-try-to-install-compiled-apk-on-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!