React Native-升级到0.62.2后无法构建-Yoga-无法在项目“ pods”中的目标“ Yoga”中打开文件

问题描述 投票:0回答:1

确实在为最新的本机反应而苦苦挣扎,找不到任何帮助。我的头撞在墙上!

我收到以下错误:

enter image description here

尝试了所有我能找到的帮助-删除/重新创建的广告连播。尝试了升级助手。删除的派生数据-无效。.非常烦人。

非常欢迎任何提示...

这里是我的Podfile:

    {
  "name": "XXX",
  "version": "0.0.2",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "react": "16.11.0",
    "react-native": "0.62.2",
    "@react-native-community/async-storage": "^1.2.2",
    "@react-native-community/cameraroll": "^1.3.0",
    "@react-native-community/masked-view": "^0.1.5",
    "@react-native-community/netinfo": "^4.0.0",
    "lodash": "^4.17.11",
    "moment": "^2.24.0",
    "react-native-blink-view": "0.0.6",
    "react-native-camera": "^3.1.2",
    "react-native-camera-roll-picker": "^1.3.0",
    "react-native-check-version": "^1.0.3",
    "react-native-datepicker": "^1.7.2",
    "react-native-dialog": "^5.6.0",
    "react-native-file-viewer": "^1.0.14",
    "react-native-form-validator": "^0.2.0",
    "react-native-fs": "2.15.2",
    "react-native-geolocation-service": "^3.0.0",
    "react-native-gesture-handler": "^1.1.0",
    "react-native-image-picker": "0.28.0",
    "react-native-image-resizer": "^1.1.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.1",
    "react-native-keyboard-aware-view": "^0.0.14",
    "react-native-loading-spinner-overlay": "^1.0.1",
    "react-native-modal": "^11.3.0",
    "react-native-permissions": "^2.0.5",
    "react-native-phone-call": "^1.0.9",
    "react-native-photo-view-ex": "^1.1.0",
    "react-native-picker-select": "^6.1.0",
    "react-native-qrcode-scanner": "^1.2.1",
    "react-native-screens": "^2.4.0",
    "react-native-shapes": "^0.1.0",
    "react-native-signature-capture": "^0.4.10",
    "react-native-simple-radio-button": "^2.7.4",
    "react-native-swiper": "^1.5.14",
    "react-native-text-ticker": "^0.18.0",
    "react-navigation": "^3.5.1",
    "react-redux": "^6.0.0",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0",
    "rn-fetch-blob": "^0.11.2"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.9.0",
    "eslint": "^6.5.1",
    "jest": "^25.3.0",
    "metro-react-native-babel-preset": "^0.58.0",
    "react-test-renderer": "16.11.0"
  },
  "jest": {
    "preset": "react-native"
  }
}
reactjs react-native react-native-ios
1个回答
0
投票

您的Podfile看起来不像Podfile。它看起来像package.json文件。

这里是Podfile示例:

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
install! 'cocoapods', :deterministic_uuids => false

def add_flipper_pods!(versions = {})
  versions['Flipper'] ||= '~> 0.33.1'
  versions['DoubleConversion'] ||= '1.1.7'
  versions['Flipper-Folly'] ||= '~> 2.1'
  versions['Flipper-Glog'] ||= '0.3.6'
  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
  versions['Flipper-RSocket'] ||= '~> 1.0'

  pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'

  pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
  pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
  pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
  pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
  pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
  pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
  pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end

def flipper_post_install(installer)
  installer.pods_project.targets.each do |target|
    if target.name == 'YogaKit'
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '4.1'
      end
    end
  end
end

target 'YourApp' do

  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  target 'YourAppTests' do
    inherit! :complete
  end

  #use_native_modules!

  add_flipper_pods!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

对Podfile进行更改后,请确保运行:cd ios && pod install && cd .. && react-native run-ios

© www.soinside.com 2019 - 2024. All rights reserved.