我有Xcode版本7.3.1节点版本v4.4.6和npm版本3.8.6如何从React^0.14.8和React-native^0.24.1升级到React 15.0.2和React-native 0.26.3
所以现在我的IOS阵营原生应用是没有问题,但建设我试图用一个库:https://github.com/aksonov/react-native-router-flux/blob/master/docs/MIGRATION.md
需要作出反应,原生版本0.26.3
所以我检查https://github.com/facebook/react-native/blob/0.26-stable/package.json,发现有一个稳定版本的React-native 0.26.3和React 15.0.2
所以我在package.json中更改了我的项目依赖项,并删除了我的node_modules
文件夹并重新安装。
"dependencies": {
"react": "15.0.2",
"react-native": "0.26.3",
"react-native-sound": "^0.8.3",
"react-redux": "^4.4.5",
"redux": "^3.5.2",
"redux-thunk": "^2.1.0"
}
但是我的应用程序不再工作,我一直在启动时出现此错误。我应该如何正确升级到React 15?
ld: warning: object file (/Users/appollo_liu/Documents/workspace/laybium_workspace/laybium/ios/build/Build/Products/Debug-iphonesimulator/libRNSound.a(RNSound.o)) was built for newer iOS version (9.0) than being linked (7.0)
Undefined symbols for architecture x86_64:
"std::terminate()", referenced from:
___clang_call_terminate in libReact.a(RCTJSCExecutor.o)
"___cxa_begin_catch", referenced from:
___clang_call_terminate in libReact.a(RCTJSCExecutor.o)
"___gxx_personality_v0", referenced from:
-[RCTJavaScriptContext initWithJSContext:onThread:] in libReact.a(RCTJSCExecutor.o)
-[RCTJavaScriptContext init] in libReact.a(RCTJSCExecutor.o)
-[RCTJavaScriptContext invalidate] in libReact.a(RCTJSCExecutor.o)
_RCTNSErrorFromJSError in libReact.a(RCTJSCExecutor.o)
+[RCTJSCExecutor runRunLoopThread] in libReact.a(RCTJSCExecutor.o)
-[RCTJSCExecutor init] in libReact.a(RCTJSCExecutor.o)
-[RCTJSCExecutor context] in libReact.a(RCTJSCExecutor.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/Build/Products/Debug-iphonesimulator/laybium.app/laybium normal x86_64
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/laybium.app
An error was encountered processing the command (domain=LaunchServicesError, code=0):
The operation couldn’t be completed. (LaunchServicesError error 0.)
Launching org.reactjs.native.example.laybium
An error was encountered processing the command (domain=FBSOpenApplicationErrorDomain, code=4):
The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 4.)
你看了[本指南](https://facebook.github.io/react-native/docs/upgrading.html)吗?你有没有运行'react-native upgrade'?它旨在更新所有与新版本的本机反应相关的附件和文件。您必须进入并手动更正升级后覆盖的任何值。 –
升级不起作用,以反应原生0.26我试图从0.14 - > 0.26.3 –