2016-04-20 64 views
0

我在內部緩存目錄的代碼和apk文件裏的句子:如何在內部文件目錄中運行安裝應用程序?

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setDataAndType(Uri.fromFile(newFile(context.getCacheDir() + "/update.apk")), "application/vnd.android.package-archive"); 
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
startActivity(intent); 

但我有一個解析錯誤:「有解析包時出現問題」

謝謝你的幫助!

回答

相關問題