Fix signatures do not match the previously installed version

报错信息

FAILURE: Build failed with an exception.

* What went wrong:
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 com.xxx signatures do not match the previously installed version; ignoring!

报错原因

不同平台开发的切换,在原手机上还有之前的安装包,在不同平台上安装应用,都会对应一个签名。比如:从mac到win上的切换或者win到mac上的切换,在切换之前,手机上已经打包了之前平台的应用,那么在新平台上重新安装就会报上这个错误。

解决方案

  • 手动卸载之前应用,在新平台上重新安装。

  • 或者使用adb命令来卸载: $ adb uninstall

参考

  • https://github.com/facebook/react-native/pull/14577/files

你可能感兴趣的:(React,React,Native,react-native,signatures,not-match)