1.小米手机安装一次再次安装就会报错,必须卸载掉再安装才能成功
错误信息,.declaration of 'android.content.res.MiuiResourcesImpl' appears in /system/framework/framework.jar 这个问题是
你已经安装此运用,卸载掉在安装即可
2.小米手机6.0之上手机运行报:
android.os.FileUriExposedException: file:///storage/emulated/0/ImageSelector/Pictures/20170805162404.jpg exposed beyond app through ClipData.Item.getUri()
则需在Application添加 这里最低是18 所以添加一个@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
在onCreate()之上,在onCreate()下添加一下代码ok:
StrictMode.VmPolicy.Builder builder1 = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder1.build());
builder1.detectFileUriExposure();