react-native - React native iOS 应用程序 - 在 Release模式下崩溃

标签 react-native release

嗨,我是 native react 新手并尝试进行发布构建。我已将 jsCodeLocation 更改为 jsbundle。还更改了架构以在 Release模式下运行。但是当我运行应用程序并单击按钮时,整个应用程序崩溃了。

我按照以下网址中的示例进行操作

https://medium.com/react-native-development/deploying-a-react-native-app-for-ios-pt-1-a79dfd15acb8

这是按钮点击的代码

moveToJoinScreen(){
    this.props.navigation.navigate('JoinNowScreen')
}

这是错误

2017-10-25 17:10:50.240 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 'console.tron.log')

2017-10-25 17:10:50.264 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 'console.tron.log')

2017-10-25 17:10:50.270 StudentCardApp[1101:710561] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: undefined is not an object (evaluating 'console.tron.log')', reason: 'Unhandled JS Exception: undefined is not an object (evaluating 'console.tro..., stack:

<unknown>@1222:448

navigate@722:256

value@779:867

onPress@779:1314

touchableHandlePress@575:1882

_performSideEffectsForTransition@488:8512

_receiveSignal@488:7295

touchableHandleResponderRelease@488:4739

Gt@435:21830

invokeGuardedCallback@435:22155

invokeGuardedCallbackAndCatchFirstError@435:22277

C@435:1870

y@435:2072

nn@435:22882

rn@435:22989

P@435:3019

processEventQueue@435:23832

G@435:5536

handleTopLevel@435:27383

<unknown>@435:28885

qn@435:28110

z@435:6018

perform@436:3484

batchedUpdates@436:18575

Ce@435:10516

Q@435:6049

K@435:6111

_receiveRootNodeIDEvent@435:28856

receiveTouches@435:29236

value@340:3107

<unknown>@340:840

value@340:2535

value@340:812

'

*** First throw call stack:

(0x2488f91b 0x2402ae17 0x2488f861 0x8d2c9 0x8817f 0x248944c4 0x247ba87d 0x247be2f7 0x8b1df 0xd19e9 0xd1839 0x53ab7f 0x545493 0x53dde1 0x546ecf 0x5467cf 0x245c1b29 0x245c1718)

libc++abi.dylib: terminating with uncaught exception of type NSException

它在 Debug模式下运行良好。有人可以帮我解决这个问题吗?提前致谢

最佳答案

似乎您正在使用 Reactotron 。 问题是 Reactotron 在非 DEV 版本中不可用。 检查讨论此问题的位置 https://github.com/infinitered/reactotron/issues/433

关于react-native - React native iOS 应用程序 - 在 Release模式下崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46923896/

相关文章:

.net - VS 2015移动文件后无法运行发布

Maven 版本-maven-plugin 版本插件2.2 -- Maven 大叔情况

cocoa - 处理临时字符串的更好方法是什么?

android - React Native 填充图标的透明部分

android - 错误 : cannot find symbol import com. facebook.react.bridge.ColorPropConverter

javascript - React Native - navigationState.children[3].key "SCENE_2"与另一个 child 冲突

c++ - QT 运行但 QImages 不显示在发布版本中

android - React-Native 中带有实心阴影的文本

java -> 任务 :invertase_react-native-apple-authentication:parseDebugLibraryResources FAILED

c++ - Windows QueueUserWorkItem C++ Release模式问题