Android Studio Run簽名報(bào)錯(cuò)[signatures do not match the previously installed version;]

[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?]

問題:

????????簽名與先前安裝的版本不匹配

原因:

????????設(shè)備安裝過帶有簽名的軟件,一般卸載即可。

? ? ? ? 有的設(shè)備仍然無法直接運(yùn)行安裝,依然報(bào)簽名不匹配問題。

? ? ? ? 但是正常打包之后帶有簽名的apk可以直接安裝成功,給debug下增加簽名即可。

解決:

????????1.?打開“Build——>Edit Build Types”,默認(rèn)Build Types提供兩種構(gòu)建模式:debug、release,這里我們處理debug;

? ? ? ? 2.一般都是默認(rèn)配置,重點(diǎn)是Signing Config選項(xiàng),發(fā)現(xiàn)沒有...去Signing中新建一個(gè).

Build Types

?????????3.準(zhǔn)備好自己的應(yīng)用簽名文件。


Signing

????????4.填寫好信息回到Build Types——選擇Signing Config——選擇剛才創(chuàng)建的Signing點(diǎn)擊OK,項(xiàng)目自動(dòng)Build...

? ? ? ? 5.完成之后發(fā)現(xiàn)build.gradle中多出下圖信息,再次點(diǎn)擊Run運(yùn)行項(xiàng)目發(fā)現(xiàn),可以嘍~


build.gradle - signingConfigs


build.gradle - buildTypes
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容