Closed ArtRoman closed 1 year ago
Not working on Android 13
Can confirm, it's not working with Android 13.
Same, it's not working on Android 13
@ArtRoman @vaibhav142 @hakimzulkufli @josevsq1 What is your library version. And did you launch and test this demo app? Please show me your test project. And then I will check
@ArtRoman @vaibhav142 @hakimzulkufli @josevsq1 What is your library version. And did you launch and test this demo app? Please show me your test project. And then I will check
I have next versions included:
// Image picker
implementation 'io.github.ParkSangGwon:tedimagepicker:1.4.2'
implementation 'io.github.ParkSangGwon:tedonactivityresult:1.1.4'
The last one is to remove old android.support dependency: #121
I have found a cause of that, that can be reproduced in your demo app module. My app has minimal targetSdkVersion, it's 31 now. When compiling to targetSdkVersion 33, all is working.
Just change targetSdkVersion to 32 or 31 to get images loading errors. Glide fails to load images:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at com.bumptech.glide.load.resource.drawable.ResourceDrawableDecoder.handles(ResourceDrawableDecoder.java:54)
at com.bumptech.glide.load.resource.drawable.ResourceDrawableDecoder.handles(ResourceDrawableDecoder.java:25)
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:90)
at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:70)
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:59)
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:76)
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:57)
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:529)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:493)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:479)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:430)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:394)
at com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:148)
at com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:76)
at com.bumptech.glide.load.model.UnitModelLoader$UnitFetcher.loadData(UnitModelLoader.java:55)
at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:70)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:63)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:280)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:393)
This is when app compiled to targetSdkVersion 33:
This is when app compiled to targetSdkVersion 31:
@ArtRoman
You have to use targetSdkVersion 33
If you use targetSdkVersion 32
, you can not support SDK 33
version device.
If you test by under 13 OS (10, 11, 12), you can see image appear. Maybe you tested android 13 OS device.
these day, there are so many android os 13 device.
So you have to use targetSdkVersion 33
So you have to use
targetSdkVersion 33
Ok, but you should have this requirement in documentation, because it's not obvious.
@ArtRoman Good suggestion. I added FAQ content. https://github.com/ParkSangGwon/TedImagePicker/blob/master/README.md#--im-using-targetsdkversion-less-than-33-and-it-doesnt-work
No images are shown in image picker on Android 13 (API level 33), tested on emulator and real device. All is OK on other android versions, from Android 5 to 12. Where is the problem?
I've switched to Android Image Picker from support library on Android 13 because of this issue.
I see Glide errors in logcat when opening TedImagePicker activity:
I'm also using Glide 4.14.2 in the project. Here are screenshots for Android 13 and Android 12 in emulator: