Android APK Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE Solution
When debugging an android Application today, the Installation reports the Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE error. The Code is as follows:
[2015-12-28 15:54:31 - MainActivity] ------------------------------[2015-12-28 15:54:31 - MainActivity] Android Launch![2015-12-28 15:54:31 - MainActivity] adb is running normally.[2015-12-28 15:54:31 - MainActivity] Performing com.runbo.outdoormeter.MainActivity activity launch[2015-12-28 15:54:31 - MainActivity] Automatic Target Mode: using device 'QCS4BU6HY9C68LY5'[2015-12-28 15:54:31 - MainActivity] Uploading MainActivity.apk onto device 'QCS4BU6HY9C68LY5'[2015-12-28 15:54:35 - MainActivity] Installing MainActivity.apk...[2015-12-28 15:54:36 - MainActivity] Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE[2015-12-28 15:54:36 - MainActivity] Please check logcat output for more details.[2015-12-28 15:54:36 - MainActivity] Launch canceled!
Okay, you cannot install it. Because this APP is built in the system, it was previously compiled directly in the linux environment and then re-pushed into the mobile phone. Today I don't want to be so troublesome, this error is reported when the APK is directly compiled and installed in Eclipse.
Run the adb shell rm system/app/OutdoorMeter/OutdoorMeter.apk command to delete the APK file, and then install it again. The same error is reported: Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE.
adb shell rm system/app/OutdoorMeter/OutdoorMeter.apk
An error occurred while deleting the APK file by running the adb uninstall com. runbo. outdoormeter command.
C:\Documents and Settings\Administrator>adb uninstall com.runbo.outdoormeterFailure [DELETE_FAILED_INTERNAL_ERROR]
Then use the adb shell rm-rf data/com. runbo. outdoormeter/command to delete the files related to the application under the data/command.
C:\Documents and Settings\Administrator>adb shell rm -rf data/data/com.runbo.outdoormeter/
After the deletion, the Installation still reports the same error: Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE. The Installation fails.
Run the adb reboot command to restart and then install the APK. The installation is successful, as shown below:
[2015-12-28 16:12:41 - MainActivity] ------------------------------[2015-12-28 16:12:41 - MainActivity] Android Launch![2015-12-28 16:12:41 - MainActivity] adb is running normally.[2015-12-28 16:12:41 - MainActivity] Performing com.runbo.outdoormeter.MainActivity activity launch[2015-12-28 16:12:42 - MainActivity] Automatic Target Mode: using device 'QCS4BU6HY9C68LY5'[2015-12-28 16:12:42 - MainActivity] Uploading MainActivity.apk onto device 'QCS4BU6HY9C68LY5'[2015-12-28 16:12:46 - MainActivity] Installing MainActivity.apk...[2015-12-28 16:12:49 - MainActivity] Success![2015-12-28 16:12:49 - MainActivity] Starting activity com.runbo.outdoormeter.MainActivity on device QCS4BU6HY9C68LY5[2015-12-28 16:12:50 - MainActivity] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.runbo.outdoormeter/.MainActivity }Let's sum up:
Step 1: Delete the existing APK with the same package name, for example, adb shell rm system/app/OutdoorMeter/OutdoorMeter.apk.
Step 2: Delete the package name directory of the application under the data/directory, for example, adb shell rm-rf data/com. runbo. outdoormeter/
Step 3: restart the Android mobile adb reboot
Step 4: reinstall the APK