我在 android.view.GLES20RecordingCanvas.drawPatch() 中看到 NullPointerException 崩溃报告
当活动启用硬件加速时,似乎仅在 4.0.x 的第 97 行崩溃。
堆栈跟踪:
java.lang.NullPointerException
at android.view.GLES20RecordingCanvas.drawPatch(GLES20RecordingCanvas.java:97)
at android.graphics.NinePatch.draw(NinePatch.java:125)
at android.graphics.drawable.NinePatchDrawable.draw(NinePatchDrawable.java:189)
at android.widget.ScrollBarDrawable.drawThumb(ScrollBarDrawable.java:178)
at android.widget.ScrollBarDrawable.draw(ScrollBarDrawable.java:137)
at android.view.View.onDrawVerticalScrollBar(View.java:9532)
at android.view.View.onDrawScrollBars(View.java:9476)
at android.view.View.draw(View.java:11091)
at android.widget.AbsListView.draw(AbsListView.java:3428)
at android.view.View.getDisplayList(View.java:10455)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2605)
at android.view.View.getDisplayList(View.java:10418)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2605)
at android.view.View.getDisplayList(View.java:10418)
at android.view.ViewGroup.drawChild(ViewGroup.java:2858)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2497)
at android.view.View.draw(View.java:11067)
at android.view.View.getDisplayList(View.java:10455)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2605)
at android.view.View.getDisplayList(View.java:10418)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2605)
at android.view.View.getDisplayList(View.java:10418)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2605)
at android.view.View.getDisplayList(View.java:10418)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2605)
at android.view.View.getDisplayList(View.java:10418)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2605)
at android.view.View.getDisplayList(View.java:10418)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2605)
at android.view.View.getDisplayList(View.java:10418)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:879)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:1955)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1661)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2505)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4945)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
是否有一个简单的解决方法,或者我需要为受影响的活动关闭硬件加速?