谁能告诉我解决或重现此问题的最佳方法?我所拥有的只是堆栈跟踪,而我的一群用户正在崩溃..
java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable()' on a null object reference
at com.android.internal.policy.BackdropFrameRenderer.onResourcesLoaded(BackdropFrameRenderer.java:113)
at com.android.internal.policy.BackdropFrameRenderer.<init>(BackdropFrameRenderer.java:85)
at com.android.internal.policy.DecorView.onWindowDragResizeStart(DecorView.java:2041)
at android.view.ViewRootImpl.startDragResizing(ViewRootImpl.java:7545)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1981)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1299)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6558)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
at android.view.Choreographer.doCallbacks(Choreographer.java:683)
at android.view.Choreographer.doFrame(Choreographer.java:619)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6317)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
如您所见,崩溃都发生在 Android API 代码中,因此我无法很好地掌握何时发生这种情况。我发现有些人在使用 React Native 和其他框架时也遇到过类似的问题。我的应用程序是 Java/Kotlin,本机代码。