I used UniversalImageLoader
(displayImage
method) for loading image
But it throws NoSuchFieldException
exception :
No field mMaxWidth in class Landroid/widget/ImageView; (declaration of 'android.widget.ImageView' appears in /system/framework/framework.jar!classes3.dex)
How to fix ?
Issue fixed but not updated in gradle version.
Solution 1 :
For now don't use
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
or
.jar file
You can download library as zip and add manually as module. I am facing same issue, but this is worked in my case.
For file changes you can check this commit: f6a9615
Solution 2 :
You can use this commit using JitPack:
In your build.gradle (app level) file, add:
repositories {
maven { url "https://jitpack.io" }
}
And replace
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
with:
implementation 'com.github.nostra13:Android-Universal-Image-Loader:f6a9615868482672c3630cb7db6dcf43391e80de'
After many researches, It seems that the bug is shown in android 10 or greater. as discussed below :
https://github.com/nostra13/Android-Universal-Image-Loader/issues/1343
So I moved to Glide library until it's later fixes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With