赞
踩
android.os.FileUriExposedException: file:///storage/emulated/0/**/**/e820cc60-cae5.jpg exposed beyond app through ClipData.Item.getUri()
在Application的onCreat()方法中添加以下代码:
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
- StrictMode.setVmPolicy(builder.build());
- builder.detectFileUriExposure();
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。