我有一个reactNative项目,我试图在最新的xcode 10.1中运行,但是在构建时它抛出了两个错误。
错误:
Users/ios/Pods/Target Support Files/React/React.xcconfig: unable to open file (in target "React" in project "Pods") (in target 'React')
Users/ios/Pods/Target Support Files/React/React.xcconfig: unable to open file (in target "React" in project "Pods") (in target 'React')
我的pod文件如下:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
EXPO_CPP_HEADER_DIR = 'ExpoKit'
target 'commonalityre' do
pod 'ExpoKit',
:git => "http://github.com/expo/expo.git",
:tag => "ios/2.6.8",
:subspecs => [
"Core",
"CPP",
"GL"
],
:inhibit_warnings => true
pod 'React',
:path => "../node_modules/react-native",
:inhibit_warnings => true,
:subspecs => [
"Core",
"ART",
"RCTActionSheet",
"RCTAnimation",
"RCTCameraRoll",
"RCTGeolocation",
"RCTImage",
"RCTNetwork",
"RCTPushNotification",
"RCTText",
"RCTVibration",
"RCTWebSocket",
"DevSupport",
"CxxBridge"
]
pod 'yoga',
:path => "../node_modules/react-native/ReactCommon/yoga",
:inhibit_warnings => true
不确定如何解决此问题。我试着删除派生数据,并且干净无济于事。仍然我收到此错误。
谢谢
答案 0 :(得分:4)
以下应该有效:
1。
rm -rf ~/Library/Developer/Xcode/DerivedData
2。
rm -rf node_modules && rm -rf ios/build/* && rm -rf android/build/* && rm -rf $TMPDIR/react-* && yarn cache clean && rm -rf /tmp/haste-map-react-native-packager-* && yarn