にインストール、私のサーバーのURLを記述し 2.ダウンロードAPK 3を試してみてください。 しかし、再インストール、成功apkをインストールします。最初に解析エラーを試してください。しかし、第二、私はAPK</p> <p>解析エラーメッセージをインストールしたときのapk</p> <p>をインストール成功、私は</p> <p>はまず欲しいアンドロイド
要約すると、まずapkをインストールしてみてください。試した後、エラーメッセージ を解析してください。成功apkをインストールします。
String url = "https://myserver/.apk ";
File apkFile = new File("/sdcard/Download/openapk.apk");
Uri mUri = Uri.parse(url);
DownloadManager.Request r = new DownloadManager.Request(mUri);
r.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "openapk.apk");
r.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
DownloadManager dm = (DownloadManager)getSystemService(Context.DOWNLOAD_SERVICE);
dm.enqueue(r);
Uri apkUri = Uri.fromFile(apkFile);
Intent webIntent =new Intent(Intent.ACTION_VIEW);
webIntent.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");
webIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(webIntent);
[解析エラーにAPK結果をインストール]の可能な重複(http://stackoverflow.com/questions/36783585/installing-an-apk-results-in-a-parse-エラー) –