Open abedsh opened 4 years ago
facing the same issue on Android 10
Same issue on Android 10
I fixed the issue by adding
android:requestLegacyExternalStorage="true"
to the manifest file Example
<application
android:name=".myApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
**android:requestLegacyExternalStorage="true"**
android:theme="@style/Theme.myApp.myTheme">
android:requestLegacyExternalStorage="true"
is only a temporary measure since as of Android 11, this will be ignored.
Any idea how to fix this?
Same issue here
Same issue on 2.2.6
If you want an Image Picker: https://github.com/Drjacky/ImagePicker/ And if you only need the fix for the mentioned issue: https://github.com/Drjacky/ImagePicker/blob/c8477e8ec5f8dc1bc86d0681dd5f58c40f9cff48/imagepicker/src/main/kotlin/com/github/drjacky/imagepicker/provider/CropProvider.kt#L114-L195
My problem is happened on Android 13 (target SDK 33). Whenever I pick image from Gallery, then Ucrop activity will crash and log exception "Bitmap could not be decoded from the Uri" and requestLegacyStorage is deprecated on android 13. So here is the solution I found out: https://developer.android.com/about/versions/13/features#photo-picker
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
UCropActivity throws an exception and closes as soon as it opens onLoadFailure is triggered on TransofmrImageListener with the following exception message:
java.lang.IllegalArgumentException: Bitmap could not be decoded from the Uri: [/data/user/0/com.app.test/cachetempImage]
./data/user/0/com.app.test/cachetempImage is the provided destinationUri to Ucrop
What is the expected behavior?
UCropActivity shouldn't throw an exception
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Update library to release 2.2.5, then open Ucrop with a source and cached destination url
Please attach any image files, URL and
stack trace
that can be used to reproduce the bug. java.lang.IllegalArgumentException: Bitmap could not be decoded from the Uri: [/data/user/0/com.app.test/cachetempImage]Which versions of uCrop, and which Android API versions are affected by this issue? Did this work in previous versions of uCrop? android 7.0+ are affected, it works with previous the version of Ucrop (2.2.4)