我使用以下工具构建我的项目。
react-native-cli: 2.0.1
react-native: 0.41.2
XCode Version 8.2.1 (8C1002)
但我收到了一个错误。
Undefined symbols for architecture arm64:
"_RCTInjectedAssertFunction", referenced from:
-[RCTWebSocketExecutor executeJSCall:method:arguments:callback:] in libRCTWebSocketDebugger.a(RCTWebSocketExecutor.o)
-[RCTWebSocketExecutor dealloc] in libRCTWebSocketDebugger.a(RCTWebSocketExecutor.o)
"__RCTLogFormat", referenced from:
-[RCTWebSocketExecutor initWithURL:] in libRCTWebSocketDebugger.a(RCTWebSocketExecutor.o)
-[RCTWebSocketExecutor webSocket:didFailWithError:] in libRCTWebSocketDebugger.a(RCTWebSocketExecutor.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我做错了什么?构建设置中有什么东西? enter image description here
答案 0 :(得分:0)
尝试此操作,从项目directroy中删除ios
,android
和node_modeules
文件夹。
然后跑,
npm install
react-native upgrade
react-native link
这适合我。