android 8.0 用第三方应用打开文件失败,报错:
FileUriExposedException ****.pdf beyond app through Intent.getData()
解决:
在Application.onCreate()方法中添加下面的代码:
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
-
StrictMode.setVmPolicy(builder.build());
问题解决。