正如标题所述,该应用在Android上的生产环境中引发null异常。使用Expo 38 SDK。
这是堆栈跟踪:
java.lang.NullPointerException:
at com.facebook.react.ReactRootView.setAllowImmediateUIOperationExecution (ReactRootView.java:480)
at com.facebook.react.ReactRootView.onMeasure (ReactRootView.java:130)
at android.view.View.measure (View.java:24730)
at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6858)
at android.widget.FrameLayout.onMeasure (FrameLayout.java:194)
at android.view.View.measure (View.java:24730)
at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6858)
at android.widget.FrameLayout.onMeasure (FrameLayout.java:194)
at android.view.View.measure (View.java:24730)
at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6858)
at android.widget.FrameLayout.onMeasure (FrameLayout.java:194)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure (ContentFrameLayout.java:143)
at android.view.View.measure (View.java:24730)
at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6858)
at android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical (LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure (LinearLayout.java:721)
at android.view.View.measure (View.java:24730)
at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6858)
at android.widget.FrameLayout.onMeasure (FrameLayout.java:194)
at android.view.View.measure (View.java:24730)
at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6858)
at android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical (LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure (LinearLayout.java:721)
at android.view.View.measure (View.java:24730)
at android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:6858)
at android.widget.FrameLayout.onMeasure (FrameLayout.java:194)
at com.android.internal.policy.DecorView.onMeasure (DecorView.java:749)
at android.view.View.measure (View.java:24730)
at android.view.ViewRootImpl.performMeasure (ViewRootImpl.java:3264)
at android.view.ViewRootImpl.measureHierarchy (ViewRootImpl.java:2047)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2342)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1935)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:8023)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1163)
at android.view.Choreographer.doCallbacks (Choreographer.java:986)
at android.view.Choreographer.doFrame (Choreographer.java:902)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1148)
at android.os.Handler.handleCallback (Handler.java:883)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7695)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:950)
顺便说一句,在相关说明中,您如何调试它?如何将生产中的Java代码映射到JS代码?我现在正在查看Sentry,但似乎它们也不支持本机崩溃报告。