2011年11月22日 星期二

如何卸載模擬器上已經安裝的應用程序

突然有一天像鬼打牆似的出現了以下的錯誤訊息:



Installing helloworld.apk...
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. WARNING: This will remove the application 
data!
Please execute 'adb uninstall com.android.Radio' in a shell.
Launch canceled!
原因是安裝的apk程序簽名不一樣導致的,apk的簽名是有jarsignerkeytool生成的,兩種的RSA散列不同所以會出現這樣的問題,解决的方法就是先卸載原來的:"You must perform a full uninstall of the application".
根據提示"Please execute 'adb uninstall com.android.Radio' in a shell"知道卸載的方式為使用cmd命令adb
解決方法
c:\>d: //指向磁碟機路徑
d:\>cd eclipse\android-sdk-windows\tools //指向自身的資料夾路徑
d:\eclipse\android-sdk-windows\tools>adb uninstall com.android.RadioA //卸載你的被鎖定的package name


沒有留言:

張貼留言