RN0.42.3 android工程嵌入RN,闪退



  • 我用的版本是:
    react-native-cli: 2.0.1
    react-native: 0.42.3

    一运行就闪退,以下是log,哪位同学知道怎么破呀

    03-21 11:55:13.470 E/ReactNativeJS(10996): undefined is not a function (evaluating '(bridgeConfig.remoteModuleConfig || []).forEach')
    03-21 11:55:13.472 I/ReactNativeJS(10996): 'Failed to print error: ', 'Requiring module "53", which threw an exception.'
    03-21 11:55:13.472 E/ReactNative(10996): Got JS Exception: TypeError: undefined is not a function (evaluating '(bridgeConfig.remoteModuleConfig || []).forEach')
    03-21 11:55:13.473 E/unknown:React(10996): Exception in native call from JS
    03-21 11:55:13.473 E/unknown:React(10996): com.facebook.react.bridge.JSExecutionException: TypeError: undefined is not a function (evaluating '(bridgeConfig.remoteModuleConfig || []).forEach') (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false:5278)
    03-21 11:55:13.473 E/unknown:React(10996): at com.facebook.react.bridge.ReactBridge.loadScriptFromFile(Native Method)
    03-21 11:55:13.473 E/unknown:React(10996): at com.facebook.react.bridge.JSBundleLoader$2.loadScript(JSBundleLoader.java:58)
    03-21 11:55:13.473 E/unknown:React(10996): at com.facebook.react.bridge.CatalystInstanceImpl$2.call(CatalystInstanceImpl.java:146)
    03-21 11:55:13.473 E/unknown:React(10996): at com.facebook.react.bridge.CatalystInstanceImpl$2.call(CatalystInstanceImpl.java:137)
    03-21 11:55:13.473 E/unknown:React(10996): at com.facebook.react.bridge.queue.MessageQueueThreadImpl$1.run(MessageQueueThreadImpl.java:73)
    03-21 11:55:13.473 E/unknown:React(10996): at android.os.Handler.handleCallback(Handler.java:739)
    03-21 11:55:13.473 E/unknown:React(10996): at android.os.Handler.dispatchMessage(Handler.java:95)
    03-21 11:55:13.473 E/unknown:React(10996): at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
    03-21 11:55:13.473 E/unknown:React(10996): at android.os.Looper.loop(Looper.java:148)
    03-21 11:55:13.473 E/unknown:React(10996): at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:184)
    03-21 11:55:13.473 E/unknown:React(10996): at java.lang.Thread.run(Thread.java:818)
    03-21 11:55:13.469 W/Binder_7( 2001): type=1400 audit(0.0:8732840): avc: denied { ioctl } for path="socket:[2316258]" dev="sockfs" ino=2316258 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0



  • http://blog.csdn.net/imsunlight/article/details/60756528
     别的贴子都太老了,只有这个比较新,可以跑起来。


登录后回复