ios - 无法打开文件(在项目 "React"的目标 "Pods"中)(在目标 'React' 中)

标签 ios iphone xcode react-native

我有一个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

不知道如何解决这个问题。我尝试删除派生数据,结果干净,没有任何帮助。我仍然收到此错误。

谢谢

最佳答案

以下应该有效:

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

关于ios - 无法打开文件(在项目 "React"的目标 "Pods"中)(在目标 'React' 中),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56036204/

相关文章:

ios - 如何快速访问闭包内的注释

iOS : Size classes issue

iphone - 跨类声明错误?

ios - UILabel 渲染到 UIImage

iphone - 保存时出现核心数据 Unresolved 错误

ios - 您将如何为 CoreData 建模以在 Swift 中保存自定义对象数组?

ios - 在 UITableViewCell View 中动画和更改 View

iphone - 如何在 sqlite 中创建时间戳字段,以便正确初始化具有 NSDate 字段的核心数据对象?

iphone - 如何将 iOS 模拟器永久设置为与英语不同的语言

iphone - 使用标签控制多个按钮