1

この投稿「Android: プログラムで .apk をインストールする」の助けを借りて。Android 2.3 デバイスで自動アップグレード/自動インストールに成功しました。

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "app.apk")), "application/vnd.android.package-archive");
startActivity(intent);

しかし、Android 4.0(ICS) デバイスでは失敗し、次のエラー メッセージが表示されました。

an existing package by the same name with a conflicting signature is already installed

何が間違っている可能性がありますか?

ありがとう!

4

1 に答える 1

2

これは、最初に Eclipse からデバイスにアプリを実行し (1 つのキーでアプリに署名する)、apk ファイルをダウンロードして (Eclipse とは異なるキーで署名された) 更新サービスを介して再度インストールしようとしたことが原因である可能性があります。ウェブから。これにより、競合する署名が発生します。

于 2011-12-12T14:44:33.717 に答える