facebookarchive / shimmer-android

An easy, flexible way to add a shimmering effect to any view in an Android app.
http://facebook.github.io/shimmer-android/
Other
5.31k stars 698 forks source link

Unable to create layer for ShimmerFrameLayout #75

Closed ikocijan closed 5 years ago

ikocijan commented 5 years ago

On LG G3 (LG-D855) there is a strange exception related to ShimmerFrameLayout. Here is a full stacktrace:

Fatal Exception: java.lang.IllegalStateException: Unable to create layer for ShimmerFrameLayout
       at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
       at android.os.MessageQueue.next(MessageQueue.java:323)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5551)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)

I know, it's a 5 years old phone, however, it supports Android 6.0 so it would be good to check why this is happening.

xiphirx commented 5 years ago

This usually means you're trying to apply a shimmer effect to a view that is too large for the gpu (typically larger than 4096x4096). A common cause is trying to apply a shimmer to a scrolling view.

pavan555 commented 3 years ago

how to solve this issue

irfanirawansukirman commented 3 years ago

@xiphirx

WendyYanto commented 3 years ago

Hi , does it mean Shimmering should not be added in a ScrollView ? or is there any alternatives ?