直接使用recyclerView.grid(spanCount = 2).dividerSpace(10.dp2px(), DividerOrientation.GRID).setup会出现:JNI DETECTED ERROR IN APPLICATION: JNI CallStaticBooleanMethodV called with pending exception java.lang.IllegalStateException: Unable to create layer for RecyclerView, size 1152x16384 max size 16383 color type 4 has context 1。
设置setHasFixedSize(true)就行了
描述
直接使用recyclerView.grid(spanCount = 2).dividerSpace(10.dp2px(), DividerOrientation.GRID).setup会出现:JNI DETECTED ERROR IN APPLICATION: JNI CallStaticBooleanMethodV called with pending exception java.lang.IllegalStateException: Unable to create layer for RecyclerView, size 1152x16384 max size 16383 color type 4 has context 1。 设置setHasFixedSize(true)就行了