首页 > 编程知识 正文

androidstudio标签报错,android签名注意事项

时间:2023-05-06 00:36:57 阅读:267635 作者:1456

[Installation failed with message INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.xxx.xxx signatures do not match the previously installed version; ignoring!.

It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?]

问题:

签名与先前安装的版本不匹配

原因:

设备安装过带有签名的软件,一般卸载即可。

有的设备仍然无法直接运行安装,依然报签名不匹配问题。

但是正常打包之后带有签名的apk可以直接安装成功,给debug下增加签名即可。

解决:

1. 打开“Build——>Edit Build Types”,默认Build Types提供两种构建模式:debug、release,这里我们处理debug;

2.一般都是默认配置,重点是Signing Config选项,发现没有...去Signing中新建一个.

Build Types

3.准备好自己的应用签名文件。

Signing

4.填写好信息回到Build Types——选择Signing Config——选择刚才创建的Signing点击OK,项目自动Build...

5.完成之后发现build.gradle中多出下图信息,再次点击Run运行项目发现,可以喽~

build.gradle - signingConfigs

build.gradle - buildTypes

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。