天天看點

軟體更新時候出現和原包名沖突

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

if you code not like this , dont worry , never mind,  the question not in there.

:)

繼續閱讀