📌  相关文章
📜  com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: 包 com.pro academy 签名与以前安装的版本不匹配;无视! - Shell-Bash (1)

📅  最后修改于: 2023-12-03 14:59:59.858000             🧑  作者: Mango

com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE

This error message indicates that the package you are trying to install has a different signature than the one previously installed, making it incompatible with the existing installation. The error message suggests ignoring the error, but doing so may cause unexpected behavior for the app.

Causes

The most common cause of this error is attempting to install an app with a different signature than the one previously installed on the device. This can happen if you have installed an app with the same package name but signed with a different certificate than the one you are currently trying to install.

Solutions
  1. Uninstall the existing app: If you are sure that you no longer need the existing installation, you can simply uninstall it from the device and then try installing the new app.

  2. Change the package name or signing certificate: If you need to maintain compatibility with the existing installation, you can change the package name of the app or the signing certificate to match the previously installed version. Keep in mind that changing the package name may affect the app's functionality, especially if it relies on other apps or services.

  3. Allow installations from unknown sources: If the error occurs when sideloading an app, check that your device allows installations from unknown sources in the security settings.

Example

The following code is an example of the error message:

com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example.app Signature incompatible with installed version in /data/app/
Conclusion

The INSTALL_FAILED_UPDATE_INCOMPATIBLE error can be caused by several factors, but the most common one is trying to install an app with a different certificate than the one previously installed. To resolve this issue, you can uninstall the existing app, change the package name or signing certificate, or allow installations from unknown sources.