An error has occurred while drawing:java.lang.IllegalStateException: The display list is not valid.
来源:互联网 发布:科学家日常 知乎 编辑:程序博客网 时间:2024/05/21 07:03
错误日志
03-31 18:41:36.523 2715-2715/demo.turing.com.materialdesignwidget W/EGL_emulation: eglSurfaceAttrib not implemented03-31 18:41:36.527 2715-2715/demo.turing.com.materialdesignwidget E/HardwareRenderer: An error has occurred while drawing: java.lang.IllegalStateException: The display list is not valid. at android.view.GLES20DisplayList.getNativeDisplayList(GLES20DisplayList.java:49) at android.view.GLES20Canvas.drawDisplayList(GLES20Canvas.java:420) at android.view.HardwareRenderer$GlRenderer.drawDisplayList(HardwareRenderer.java:1646) at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1469) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2405) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2277) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1907) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1024) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5694) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) at android.view.Choreographer.doCallbacks(Choreographer.java:574) at android.view.Choreographer.doFrame(Choreographer.java:544) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5045) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at dalvik.system.NativeStart.main(Native Method)
情景重新
我再编写一个RecyclerView的页面时,数据加载完成之后,点击进入Activity时,很卡并且无法上下滑动,查看日志发现如上信息,根据日志 HardwareRenderer….大致可以猜测出是硬件加速造成的,我使用的是模拟器,可能是对硬件加速的支持不好..
解决方法
在清单文件中对应的发生崩溃的Activity中加入
android:hardwareAccelerated=”false”
如下所示
<activity android:name=".recyclerView.RecyclerViewAct" android:hardwareAccelerated="false" />
重新运行,问题解决。
1 0
- An error has occurred while drawing:java.lang.IllegalStateException: The display list is not valid.
- java.lang.IllegalStateException: The display list is not valid. 错误分析
- an error has occurred while trying to access the log file. logging may not function properly
- An error occurred while completing process -java.lang.reflect.InvocationTargetException
- an error occurred while completing process -java.lang.reflect.InvocationTargetException
- An internal error has occurred. java.lang.NullPointerException
- An internal error has occurred. java.lang.NullPointerException
- myeclipse An internal error has occurred. java.lang.NullPointerException
- An internal error has occurred. java.lang.NullPointerException
- an error occurred while processing the directive
- an error occurred while contacting the respository
- Caused by: java.lang.IllegalStateException: Error occurred while storing entity [Entity {id='500228'
- An error has occurred while establishing a connection to the server处理方法
- An error (-5006: 0×80070002) has occurred while running the setup
- an error has occurred. - no valid devices were found
- myeclipse报An error has occurred,See error log for more details. java.lang.NullPointerException错误
- An error has occurred. See error log for more details. java.lang.IncompatibleClassChangeError
- 亲测,Eclipse报"An error has occurred,See error log for more details. java.lang.NullPointerException"
- Httpie 工具入门使用
- Activity之Notification(通知)
- 新框架(BSF_JAVA)环境部署个人总结
- 如何对singleInstance的Activity多次传入Intent
- 格雷码和二进制码的转换
- An error has occurred while drawing:java.lang.IllegalStateException: The display list is not valid.
- 算法问题(2)输出全排列
- 学到一个android小应用-霓虹灯闪烁效果界面
- Linux 命令使用
- 使用批处理获取拖拽文件的文件名+扩展名
- 22.4-5拓扑排序BFS
- 删除windows文件右击打开方式中的无效程序选项
- SpringMVC -- POJO/@RequestParam (3)
- 面试-阿里