具体错误: 在选择选择图片或拍照 后进行图片裁剪 报错:

         Caused by: android.os.FileUriExposedException: file:///storage/emulated/0/maps/picture.jpg exposed beyond app through Intent.getData()

        造成原因:Android 版本不一样  权限的申请方式不一样,例Android7.0+ 文件读取时 

        解决方法:(两种)1.链接:百度到最多的方法 (此方法没有亲测,因为麻烦)

                                       2.在 Activity的onCreate()里添加 两行代码    (亲测,有用)       

StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();StrictMode.setVmPolicy(builder.build());

                                       第二种方法的详解地址:https://blog.csdn.net/tanghongchang123/article/details/68490946

更多相关文章

  1. Android中滑屏初探 ---- scrollTo 以及 scrollBy方法使用说明
  2. Android异步加载图像小结 (含线程池,缓存方法)
  3. android上一些方法的区别和用法的注意事项
  4. android WebView 图片缩放功能小结
  5. Android实现下载文件功能的方法
  6. Android 主流图片库Picasso Glide Fresco对比分析
  7. Android 通讯录中用到的关于按名字首字母排序方法

随机推荐

  1. Android(安卓)Studio 3.1.1更新问题Could
  2. Android - 购物车页面【仿】淘宝App
  3. Android 百度地图的使用
  4. Graphics->Compass
  5. Android:Material Design详解
  6. Android SwitchButton(滑动开关)
  7. Android 中沉浸式状态栏实现
  8. Android乐动力V5.75最新获Key方法,提交步
  9. android http get
  10. Android之简单模仿微信聊天界面