APK下载到android系统的cache目录下,在调用系统应用安装程序,有时下载完成安装的时候会出现:“ There is a probelm parsing the package”,权限都添加了,可是还是出现包解析异常,请问大仙们这是什么问题???
//下载目录
File streamingDownlaod = Environment.getDownloadCacheDirectory();
// 安装下载后的应用程序
private void installNewApk(String fileName) {
// TODO Auto-generated method stub
Intent intent = new Intent(Intent.ACTION_VIEW);
Context context = this.getApplicationContext();
intent.setDataAndType(
Uri.fromFile(new File(streamingDownlaod, fileName)),
"application/vnd.android.package-archive");
startActivity(intent);
}
------解决方案--------------------
没弄过,学习下,帮顶了