我在 Google Play 控制台上看到我的 react-native 应用程序崩溃。崩溃的堆栈跟踪列出了以下内容:-
com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 'y.navigate'), stack:
onPress@4696:1046
touchableHandlePress@218:2269
touchableHandlePress@-1
_performSideEffectsForTransition@209:9693
_performSideEffectsForTransition@-1
_receiveSignal@209:8375
_receiveSignal@-1
touchableHandleResponderRelease@209:5663
touchableHandleResponderRelease@-1
b@92:1197
k@92:1340
C@92:1394
N@92:1692
A@92:2482
forEach@-1
z@92:2282
<unknown>@92:13914
_e@92:88659
Ne@92:13582
Ue@92:13755
receiveTouches@92:14547
value@31:3685
<unknown>@31:841
value@31:2939
value@31:813
value@-1
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(Unknown Source
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (Unknown Source:150)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (Unknown Source:21)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:883)
at android.os.Handler.dispatchMessage (Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (Unknown Source)
at android.os.Looper.loop (Looper.java:237)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (Unknown Source:37)
at java.lang.Thread.run (Thread.java:919)
谁能告诉我这个问题的根本原因?我正在使用 react-navigation 库中的以下内容:
不确定这个问题是否与 react-navigation 有关,但它确实在堆栈跟踪中说 y.navigate。