【问题标题】:React Native IOS platform 'folly/Portability.h' file not found未找到 React Native IOS 平台“folly/Portability.h”文件
【发布时间】:2020-01-15 12:43:52
【问题描述】:

看了之前打开的话题,没有解决,

https://stackoverflow.com/a/25257238/12702367

我按照说明进行操作。从 xcode 开始时出现错误

'folly/Portability.h' 文件未找到

xcode 返回此错误

没有名为 folly 的文件

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。 错误的根源会不会是因为folly文件夹没有正确传输?

    # 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

【问题讨论】:

    标签: javascript reactjs native react-native-ios


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-17
      • 1970-01-01
      • 1970-01-01
      • 2017-06-19
      • 2019-08-10
      • 2017-11-03
      • 2018-09-10
      • 1970-01-01
      相关资源
      最近更新 更多