Re-installation failed due to different application signaturesと出て、エミュレータが起動しない
アプリをコンパイルして「実行」としたら、エミュレーターが起動しない。何度も実行ボタンを押してみるが変化がない。
よくよくログを見てみると、以下のようなエラーが。
[2011-02-17 00:38:26 - mysample] Re-installation failed due to different application signatures. [2011-02-17 00:38:26 - mysample] You must perform a full uninstall of the application. 警告: This will remove the application data! [2011-02-17 00:38:26 - mysample] Please execute 'adb uninstall com.mysample.kyart' in a shell. [2011-02-17 00:38:27 - mysample] 起動はキャンセルされました!
アプリケーションのシグネチャーが違うので一度アプリをアンインストールせよ、と書いてある。
adb uninstall com.mysample.kyart
をシェルで実行せよともある。
さて、このadbというコマンドを探すのが大変だった。仮にCドライブ直下に「pleiades」というフォルダにEclipseをインストールしていると、このコマンドは以下の場所にある。
C:\pleiades\android-sdk-windows\platform-tools
つまりSDKのディレクトリ直下の「platform-tools」というディレクトリに入っている。
あとはcmdを立ち上げて、このディレクトリで、
adb uninstall com.mysample.kyart
を実行する。その際、エミュレーターは立ち上がっていないと、
Error: Could not access the Package Manager. Is the system running?
と聞かれてしまうので要注意。
あと単純に
Failure
と出る場合は、パッケージ名(com.sample.androidみたいな)がadbの第二引数として正しく入っているか確認してみよう。