我有这个错误
? ld: library not found for -lDoubleConversion
? clang: error: linker command failed with exit code 1 (use -v to see invocation)
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening App.xcworkspace
** BUILD FAILED **
The following build commands failed:
Ld /Users/mohamedelmi/workspace/elmi/food-frontend/ios/build/App/Build/Intermediates.noindex/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App normal x86_64
(1 failure)
Run Code Online (Sandbox Code Playgroud)
这是我所做的
首先,确保Libraries -> React.xcodeproj -> ThirdParty -> double-conversion
存在,并从中生成一个静态库,如下所示:
然后,如果您正在使用可可粉,请确保添加DoubleConversion
到您的Podfile
:
target 'MyApp' do
pod 'React', :path => "../node_modules/react-native", :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
# the following ones are the ones taken from "Libraries" in Xcode:
'RCTAnimation',
'RCTActionSheet',
'RCTBlob',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
pod 'yoga', :path => "../node_modules/react-native/ReactCommon/yoga"
# Here it goes
pod 'DoubleConversion', :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec"
pod 'Folly', :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec"
end
Run Code Online (Sandbox Code Playgroud)
最后,如果到目前为止所有这些都不起作用,那么可以手动运行一个脚本来解决React的第三方依赖关系。
只需node_modules/react-native
输入以下内容:
$ ./scripts/ios-install-third-party.sh
Run Code Online (Sandbox Code Playgroud)
重要:始终在内部运行它node_modules/react-native
。因为据我所知,该脚本使用相对路径来存储第三方的源代码,并且react native将始终在处寻找它node_modules/react-native/third-party
。因此,只需确保在正确的位置运行它即可。
注意:该脚本可能已经在项目中作为构建阶段运行。
归档时间: |
|
查看次数: |
2014 次 |
最近记录: |