Closed tatsuyuki25 closed 7 years ago
Hello, @tatsuyuki25 you are right. I think that FileProvider can resolve this. We need to update our project. Can you provide logcat with this crash?
W/System.err: java.io.FileNotFoundException: No such file or directory
W/System.err: at android.os.Parcel.openFileDescriptor(Native Method)
W/System.err: at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:253)
W/System.err: at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:199)
W/System.err: at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:932)
W/System.err: at android.content.ContentResolver.openOutputStream(ContentResolver.java:702)
W/System.err: at android.content.ContentResolver.openOutputStream(ContentResolver.java:678)
W/System.err: at com.yalantis.ucrop.task.BitmapCropTask.saveImage(BitmapCropTask.java:170)
W/System.err: at com.yalantis.ucrop.task.BitmapCropTask.crop(BitmapCropTask.java:151)
W/System.err: at com.yalantis.ucrop.task.BitmapCropTask.doInBackground(BitmapCropTask.java:94)
W/System.err: at com.yalantis.ucrop.task.BitmapCropTask.doInBackground(BitmapCropTask.java:35)
W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:292)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
W/System.err: at java.lang.Thread.run(Thread.java:818)
In BitmapCropTask should not be used Uri.fromFile
outputStream = new FileOutputStream(new File(outputUri.getPath())); //must be convert to outputStream = mContext.getContentResolver().openOutputStream(outputUri);
这个代码可以修改掉提交一下吗,在2.2.1的更新记录里没有看到
In BitmapLoadTask
Because Android 7.X can not use Uri to File