Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match the previously installed version; ignoring

I get this error when trying generate a debug apk for update an app directly on the device (Android - React Native):

Execution failed for task ':app:installDebug'.

com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to finalize session : INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package prensa.com signatures do not match the previously installed version; ignoring!

Im sure that version code and version name were incremented and the package name is the same.

Also, the keystore and other keys are same used before.

Where is the error?

like image 880
Jhonmer Araujo Avatar asked Apr 10 '18 15:04

Jhonmer Araujo


5 Answers

Just in case if somehow your old application is not removed 100% or its data is not removed.

Try:

adb uninstall "com.yourapp.yourapp"
like image 105
power-cut Avatar answered Nov 20 '22 08:11

power-cut


I met the same error today.And I found thishttp://blog.bihe0832.com/android-v2-issue.html.It's in Chinese.The key points describe below:

After package your apk file, unzip it,check the file META-INF/ANY-NAME.SF.I sign the apk with jarsigner command line tool.I found that the alias putted after the jar-file when exec the jarsigner, will used as the ANY-NAME.Then open the ANY-NAME.SF, if you found a line of X-Android-APK-Signed: 2,That's the cause of the error.Resign your apk,if the line of code gone, the apk will be installed success.

like image 27
Eilir Avatar answered Nov 20 '22 07:11

Eilir


Make sure you know which device adb is dealing with.

I had multiple devices available. I couldn't understand why uninstalling on my emulator didn't get rid of the message. It turned out that my hardware phone was plugged into the computer to charge, and also had USB debugging enabled which was confusing adb.

Disabling USB debugging on my hardware phone, and uninstalling the app on the emulator got it sorted.

like image 4
Thomas G Henry Avatar answered Nov 20 '22 07:11

Thomas G Henry


for me this was because i tried installing a debug version on a phone that already had a production version installed. in other words, the installed app was signed with the release.keystore file, while the debug version is signed with debug.keystore file.

so i just uninstalled the app so that it could install the app that was signed with debug.keystore file.

like image 3
hndvf Avatar answered Nov 20 '22 06:11

hndvf


INSTALL_FAILED_UPDATE_INCOMPATIBLE

Please uninstall your Previous APk and install again updated APK

gradlew clean

npm start -- --reset-cache

react-native run-android
like image 2
Keshav Gera Avatar answered Nov 20 '22 06:11

Keshav Gera