【发布时间】:2016-03-26 15:09:13
【问题描述】:
我正在尝试使用
打开应用程序先前创建的 htmlIntent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(htmlFile), "text/html");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
并且带有 api 23 的模拟器说错误被拒绝。我要重新申请权限吗?
【问题讨论】:
-
"error denied" 什么被拒绝了?访问本地文件?
-
最好显示完整的堆栈跟踪。
-
您没有使用问题中的代码访问 Android 上的文件。您正在要求第三方应用程序打开文件。能不能完全取决于
htmlFile的值是多少。
标签: android file permissions