【Android 非常基础】Apk安装失败no activity found handle intent或安装结束不提示完成
2015-01-20 10:04
676 查看
1.出现no activity found handle intent,一般是因为intent跳转失败。在进行以下语句跳转时,忽略了在apk路径前添加"file://",导致跳转失败,注意添加即可。
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://"+"apk本地路径", "application/vnd.android.package-archive");
2.在某些机子上(例如小米2或部分华为平板)出现安装结束但不提示完成,那么在intent中添加一个flag,intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);这样问题就能解决。
以上第二条,为什么添加了这样一个flag就能解决问题,我还没有研究出来,哪位大神能告知原因,多谢。
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://"+"apk本地路径", "application/vnd.android.package-archive");
2.在某些机子上(例如小米2或部分华为平板)出现安装结束但不提示完成,那么在intent中添加一个flag,intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);这样问题就能解决。
以上第二条,为什么添加了这样一个flag就能解决问题,我还没有研究出来,哪位大神能告知原因,多谢。
相关文章推荐
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- Android studio出现错误:android.content.ActivityNotFoundException No Activity found to handle Intent { a
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.lby.action }
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- Android:使用 DownloadManager 进行版本更新,出现 No Activity found to handle Intent 及解决办法
- Android关于No Activity found to handle Intent的问题
- Android开发之bug-No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.speech.a
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- No Activity found to handle Intent { act=android.intent.action.VIEW
- 在5.0 系统设置网络报 android.content.ActivityNotFoundException: No Activity found to handle Intent { act=and
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android点滴21:No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.a
- MiUi4.5.30 调用系统相机并且剪裁出现:No Activity found to handle Intent { act=com.android.camera.action.CROP
- android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.a
- [Android一千零一个] android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent