軟件更新時候出現和原包名衝突
如果你是一個開發人員,那麼出現這個問題可能是因為,較舊的版本你是使用eclipse自動發布到模擬器上的,而eclipse自動發布時使用的是一個測試用簽名,這個簽名與你正式打包的簽名不是一個。(這個問題一般發生在測試自動更新功能上,嘿嘿)。想繼續測試自動更新,解決的辦法也很簡單,手工刪除該軟件的舊版(eclipse自動安裝的那個),然後使用adb工具安裝舊版再測試新版就好。自動更新的安裝代碼一般是這樣:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("file://" + apkfile.toString()),
"application/vnd.android.package-archive");
mContext.startActivity(i);
或許你和這略有不同,不用擔心,沒什麼,問題不在這裏。
下麵是給外國朋友的,請原諒我蹩腳的英語:
for foreigner,please forgive my broken:
When you try install a new version of a software on android, maybe you will receive this message: an existing package by the same name with a conficting signature is already installed!
I take it easy! Uninstall old version soft, and then install new version. In this process , maybe you need get "root" popedom.
If you are developer, you receive this message maybe because the old version is install by the eclipse. Eclipse use a debug keystore signature. I guess you try test you autoupdate function. You can uninstall it (eclipse auto package version) in setting tool. And install the old version (which you signature package) by ADB.exe before you test autoupdate function.
Autoupdate function code always like this:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("file://" + apkfile.toString()),
"application/vnd.android.package-archive");
mContext.startActivity(i);
If you code not like this , dont worry , never mind, the question not in there.
:)
最後更新:2017-04-03 16:49:19