未找到React Native IOS平台'folly/Portability.h'文件

jvidinwx  于 2023-10-22  发布在  React
关注(0)|答案(2)|浏览(132)

我看了看以前开放的主题,没有解决方案,
https://stackoverflow.com/a/25257238/12702367
我照指示做了。当我从xcode启动时,我得到一个错误
'folly/Portability.h'文件未找到
xcode返回此错误
根本没有什么文件叫愚蠢
enter image description here

{
  "name": "..",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.6.2",
    "@react-native-community/datetimepicker": "^2.1.0",
    "axios": "^0.19.0",
    "buffer": "^5.4.3",
    "formik": "^1.5.2",
    "mobx": "^5.9.4",
    "mobx-react": "^5.4.3",
    "moment": "^2.24.0",
    "native-base": "^2.13.8",
    "react": "16.8.3",
    "react-native": "0.59.8",
    "react-native-24h-timepicker": "^1.0.0",
    "react-native-flash-message": "^0.1.15",
    "react-native-gesture-handler": "^1.1.0",
    "react-native-image-picker": "^0.27.2",
    "react-native-image-resizer": "^1.0.1",
    "react-native-maps": "https://github.com/react-native-community/react-native-maps.git#c102c36d895cbef8b6a8deefd4c58fb0dc17638e",
    "react-native-uuid": "^1.4.9",
    "react-native-permissions": "2.0.0",
    "react-native-vector-icons": "^6.6.0",
    "react-navigation": "^3.6.1",
    "recyclerlistview": "^2.0.12",
    "yup": "^0.27.0"
  },
  "devDependencies": {
    "@babel/core": "7.6.2",
    "@babel/plugin-proposal-decorators": "^7.6.0",
    "@babel/runtime": "7.6.2",
    "babel-jest": "24.9.0",
    "babel-plugin-transform-decorators-legacy": "^1.3.5",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "jest": "24.9.0",
    "metro-react-native-babel-preset": "0.56.0",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  },
  "rnpm": {
    "assets": [
      "resources/fonts"
    ]
  }
}

当前的podfile错误的来源可能是因为愚蠢的文件夹没有正确传输?

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target '..' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for ..

# Pods for ..
pod 'React', :path => '../node_modules/react-native'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'

# Third party deps podspec link
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 '..Tests' do
    inherit! :search_paths
    # Pods for testing
  end

end
xam8gpfp

xam8gpfp1#

这意味着你没有正确安装pod!错误说明Xcode无法找到.h文件,因为它无法在项目中看到这样的库或路径!尝试先清理代码,然后切换到终端并重新安装pod!希望能解决你的问题!

m0rkklqb

m0rkklqb2#

试试这个:

cd ios
pod deintegrate
rm Podfile.lock
pod install

相关问题