我在Mac Os Monterey机器上运行命令npx react-native run-ios
时面临以下问题。有人能帮我一下吗?
** BUILD FAILED **
The following build commands failed:
CompileC /Users/prashanth/Library/Developer/Xcode/DerivedData/myapp-akpvurjcnemajucrerqjfkzzxnng/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o /Users/prashanth/Documents/REPO/app/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
(1 failure)
我在Pod文件
中有以下几行platform :ios, '9.0'
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
版本的节点:15.14.0,React Native: 0.62.2;Xcode: 13.4.1
谢谢!
在iOS文件夹中进入Pods/Pods.xcodeproj/xcuserdata/project.pbxproj
将所有'IPHONEOS_DEPLOYMENT_TARGET = 11.0
'更改为'IPHONEOS_DEPLOYMENT_TARGET = 12.4'
。保存并运行
注意:每次安装时,它都会改变,所以你必须重新安装。如果有更好的方法,请提出来。