古詩詞大全網 - 個性簽名 - 怎樣找到簽名沖突的同名數據包

怎樣找到簽名沖突的同名數據包

出現"已安裝了存在簽名沖突的同名數據包"的原因及解決辦法

如果妳在android上更新壹個已經安裝過較早版本軟件時,安裝到最後壹步提示妳:已安裝了存在簽名沖突的同名數據包,然後安裝失敗。這是因為舊版軟件的簽名信息與新版不壹致造成的。妳可以卸載這個軟件,然後安裝新版軟件。

如果無法卸載,可能手機(pad)在發售前將該軟件內置在手機中無法卸載。如果是這個原因的話,妳可以嘗試“root”系統,然後卸載掉該軟件的舊版本,然後安裝。

如果妳是壹個開發人員,那麽出現這個問題可能是因為,較舊的版本妳是使用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.

:)