INSTALL_FAILED_UPDATE_INCOMPATIBLE but app not ins

2019-06-26 07:48发布

问题:

I am getting an INSTALL_FAILED_UPDATE_INCOMPATIBLE error upon doing a

adb install MyPackage.apk

I did what all other posts out there suggest, namely an uninstall of the package with

adb uninstall com.company.package

(with appropriate substitutions for 'company' and 'package'), which reports 'Success', but the install error still appears...

In the adb logcat output I get

No content provider found for permission revoke: 
   file:///data/local/tmp/MyPackage.apk
Package com.company.package codePath changed from 
   /data/app/com.company.package-1.apk to 
   /data/app/com.company.package-2.apk; Retaining data and using new
Package couldn't be installed in /data/app/com.company.package-2.apk

Which suggests that there are still traces of a previous install left, but I cannot figure out how to get rid of those traces.

Any ideas? The device is not rooted and I would like to keep it that way if possible.

回答1:

In my case, even though I uninstalled the app, it was still installed for other users. Go to Settings > Apps > "Your App" > Uninstall for all users in the menu.

My device is a Nexus 5 running API 22 (5.1)



回答2:

I think this is a problem with the Android 5.0+ devices, i have a nexus 6 with the update 5.1.1

I removed the original application but i still having the message:

INSTALL_FAILED_UPDATE_INCOMPATIBLE 

The solution was 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 with the option:

"Uninstall for all users"



回答3:

Why this happens?

I had this same error.

Play console uses package id like com.example.come.myapp to identify the app, when an 'update' is sent then the same package id is expected. However when it cannot ascertain that it is the same app, but an update is being made, this error is shown.

How to solve?

I had one installed on phone, try to update it to next release version, but it failed. Even after uninstalling the app this issue continued. Later I learned that since the package id is changed, I had two applications on device with same name. I uninstalled both then it worked, I did uninstall manually on phone.

If the above din't work try below:
- uninstall manually from phone
- try go to Settings > Apps and see if any new apps of yours came in, unintsall them
- try go back to previous settings like package id, and see if that works
- restart phone and check
- check if you changed your keys

How to avoid this & other issue?

There are many things that can go wrong if your source code is are not under source code control system like, so better to be on a private git (https://github.com/), and use Git GUI tool on your machine to see what changes are being made. Once all changes work (upload to play console) is all success only then do the commit changes, or you will lose track of the many things we change in a hurry between releases, and the update fails.

I had hard time finding exact issue to fix this, hope above helps.