我正在从事我的React Native项目。当我尝试使用此命令react-native run-ios
运行 ios 时,出现此错误(请参见下文)。
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 *.xcworkspace
** BUILD FAILED **
The following build commands failed:
CompileC /****/ios/build/SykesPHMobile/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DoubleConversion.build/Objects-normal/x86_64/fixed-dtoa.o /****/ios/Pods/DoubleConversion/double-conversion/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /****/ios/build/SykesPHMobile/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DoubleConversion.build/Objects-normal/x86_64/strtod.o /****/ios/Pods/DoubleConversion/double-conversion/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /****/ios/build/SykesPHMobile/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DoubleConversion.build/Objects-normal/x86_64/double-conversion.o /****/ios/Pods/DoubleConversion/double-conversion/double-conversion.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /****/ios/build/SykesPHMobile/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/DoubleConversion.build/Objects-normal/x86_64/fast-dtoa.o /****/ios/Pods/DoubleConversion/double-conversion/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(4 failures)
但是,当我直接在Xcode中运行并构建ios项目时,我没有遇到任何错误,它在模拟器中成功运行了该项目。这是我的反应本机CLI的详细信息
System:
OS: macOS 10.15.2
CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
Memory: 165.61 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.1 - /usr/local/bin/node
npm: 6.13.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Android Studio: 2.3 AI-162.4069837
Xcode: 11.2/11B52 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
我已经在下面尝试了以下解决方案。
react-native run-ios
任何想法如何解决此错误。
答案 0 :(得分:0)
答案 1 :(得分:0)
删除项目名称中的空格可解决此问题。我会将上面的问题标记为已回答。