Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal Exception: java.lang.IllegalStateException - Unable to create layer for LinearLayout(Crashing in only Galaxy j4+, j6+)

Fatal Exception: java.lang.IllegalStateException Unable to create layer for LinearLayout, size 768x5440 max size 8192 color type 4 has context 1

android.os.MessageQueue.nativePollOnce (MessageQueue.java)
android.os.Looper.loop + 181 (Looper.java:181)
android.app.ActivityThread.main + 7097 (ActivityThread.java:7097)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit.main + 975 (ZygoteInit.java:975)

I received a nativePollOnce.java crash alarm from the firebase Crashlytics, but only a few of the many (galaxy j4 +, j6 +) models will crash frequently. How did i resolve this?

like image 865
BEOM KI Avatar asked Jul 15 '19 02:07

BEOM KI


2 Answers

I had this error and bought a samsung J4 device to solve it. In my case there was a screen with many recyclerviews and nestedscrollviews. The solution was to remove "match_parent" and manually set the size (height or widht) of one of the recyclerviews. I think this somehow made the calculations of the GPU easier.

like image 171
MSilva Avatar answered Oct 19 '22 23:10

MSilva


It seems like this issue is related - the first answer in that link that links to Scene transition with hero elements throws Layer exceeds max. dimensions supported by the GPU might help you.

like image 43
Kevin Kokomani Avatar answered Oct 19 '22 22:10

Kevin Kokomani