我看到在android.view.GLES20RecordingCanvas.drawPatch()NullPointerException異常崩潰報告的NullPointerException在android.view.GLES20RecordingCanvas
似乎在線路97轟然4.0 .x,當活動有硬件加速時。
堆棧跟蹤:
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)
是否有一個簡單的辦法解決這個,還是我只是需要關閉硬件加速受影響的活動?
Post some code ... –
沒有相關的代碼 - 當我試圖恢復4.0.x設備上的後臺活動時發生這種情況。你可以在崩潰中看到,它看起來像試圖繪製ListView滾動縮略圖時崩潰。 – theelfismike
你試過我的回答嗎?請讓我知道它是否對你有所幫助。 – Saran