Android-universal-image-loader: java.lang.NoSuchFieldException: No field mMaxHeight in class Landroid/widget/ImageView

Created on 7 Jul 2019  路  12Comments  路  Source: nostra13/Android-Universal-Image-Loader

any help resolving this?
Screen Shot 2019-07-06 at 7 45 00 PM

Most helpful comment

I created a PR to fix the problem but obviously without the repo being maintained, it may never be merged:

https://github.com/nostra13/Android-Universal-Image-Loader/pull/1348

Here is my fork:

https://github.com/DanAtApex/Android-Universal-Image-Loader

All 12 comments

i have got the same issues. Have you resolved it yet?

No, not yet.

But I believe there might be at least 1 fork where this is fixed. I tried finding but could not find one.

Ok, thank you.
I'll wait for your good news.
:)

Anything happening with this ticket?
Having same issue all of a sudden.

Same issue with Android Q only

java.lang.NoSuchFieldException: No field mMaxHeight in class Landroid/widget/ImageView;

Here is android documentation of the Restricted class

Greylist non-SDK interfaces that are now restricted in Android Q

Need to update library according to support Android Q

I think you can implement your owner ImageAware and define proper width/height for small image or big one.

I moved to using Glide. Thanks

Are there any new informations about this ? I am getting this error and can not move forward with my project because of this...

I created a PR to fix the problem but obviously without the repo being maintained, it may never be merged:

https://github.com/nostra13/Android-Universal-Image-Loader/pull/1348

Here is my fork:

https://github.com/DanAtApex/Android-Universal-Image-Loader

This happens because your imageview is still not inflated when you use it. Probably because you have nested fragments (childFragmentManager).
Use this to make sure the imageView is ready for use:

IMAGEVIEW.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
                @Override
                public void onGlobalLayout() {
                    IMAGEVIEW.getViewTreeObserver().removeOnGlobalLayoutListener(this););
                    //Load an image to your IMAGEVIEW here
                }
            });
Was this page helpful?
0 / 5 - 0 ratings