错误:
E/BitmapFactory﹕ Unable to decode stream: java.io.FileNotFoundException: /file:/storage/sdcard0/Pictures/JPEG_20140728_190726_1641148246.jpg: open failed: ENOENT (No such file or directory)
但我可以在F:\Pictures\JPEG_20140728_190726_1641148246.jpg
(移动存储)中看到文件
我正在使用 Taking Photos Simply | Android Developers 中的方法,但如果你需要查看代码,我可以复制到这里
我还添加了权限:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
我想要的只是使用相机 Intent 拍照,保存图像,将路径保存到数据库,然后将其显示在 map 上......
我正在 android 4.4.2 (CM) 上进行测试
最佳答案
从您的示例中:
mCurrentPhotoPath = "file:" + image.getAbsolutePath();
尝试使用:
mCurrentPhotoPath = image.getAbsolutePath();
关于Android - FileNotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25001074/