0

重现步骤:

react-native init FirstProject cd FirstProject open ios/FirstProject.xcodeproj

... Xcode 打开项目:

在此处输入图像描述

我选择构建目标 iOS Simulator -> Iphone XR

在后台打开一个终端窗口:

在此处输入图像描述

但是,Xcode 返回一个构建错误:

ld: library not found for -lDoubleConversion
clang: error: linker command failed with exit code 1 (use -v to see invocation)

此处显示警告https://gist.github.com/jasonfb/7b51a260df419590c6fadda93fb49348

在此处输入图像描述

4

1 回答 1

2

您应该按照项目创建脚本末尾的说明打开工作区,而不是项目文件:

    • cd "/Users/xxx/FirstProject" && npx react-native run-ios
    - or -
    • Open FirstProject/ios/FirstProject.xcworkspace in Xcode or run "xed -b ios"
    • Hit the Run button```
于 2020-03-03T21:12:21.507 回答