【问题标题】:React/RCTDefines.h file not found in RCTBridgeModule.h在 RCTBridgeModule.h 中找不到 React/RCTDefines.h 文件
【发布时间】:2019-05-08 03:12:36
【问题描述】:

我使用的是Expo,我将expo eject 分开以供模块使用。

我在 iOS 文件中尝试了pod install。这是工作。

Pod 安装完成! Pod 文件中有 51 个依赖项 总共安装了 63 个 pod。

但是在打开Xcode并按下build and run按钮时出现错误。

package.json:

{
  "name": "testgame",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "babel-cli": "6.26.0",
    "babel-plugin-module-resolver": "^3.1.1",
    "babel-preset-es2015": "6.24.1",
    "jest-expo": "27.0.0",
    "react-native-scripts": "1.14.0",
    "react-test-renderer": "16.3.1"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "jest"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^8.1.0",
    "bignumber.js": "^8.1.1",
    "crypto-browserify": "^3.12.0",
    "eth-lightwallet": "^3.0.1",
    "ethereumjs-tx": "^1.3.7",
    "ethereumjs-util": "^6.0.0",
    "ethereumjs-wallet-react-native": "^0.6.7",
    "expo": "^30.0.0",
    "expokit": "^1.8.0",
    "formik": "^1.3.2",
    "js-sha3": "^0.8.0",
    "native-base": "^2.8.2",
    "node-libs-browser": "2.1.0",
    "react": "16.3.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
    "react-native-confirmation-code-input": "^1.0.4",
    "react-native-fast-crypto": "^1.8.1",
    "react-native-fetch-blob": "git+https://github.com/HCL-HO/react-native-fetch-blob-expo.git",
    "react-native-fs": "^2.13.3",
    "react-native-keychain": "^3.1.2",
    "react-native-pin-view": "^2.2.1",
    "react-native-secure-randombytes": "^3.0.0",
    "react-native-touch-id": "^4.4.1",
    "react-navigation": "3.0.4",
    "web3": "1.0.0-beta.34",
    "yup": "^0.26.6"
  }
}

Xcode 版本:10.2.1

我以前从未使用过Xcode,所以我是初学者。请详细说明。如果你能用截图解释一下,我将不胜感激。

【问题讨论】:

    标签: ios xcode react-native expo


    【解决方案1】:

    我自己做了一个podsec并解决了。

    这在官方文档中没有,需要模块开发者的基本解决方案。

    这个解决方案创建了很多Warning。代码没有问题。

    1. 从标头搜索路径中删除 react-native-secure-randombytes 路径
    2. 取消链接 react-native-secure-randombytes 模块 - react-native 取消链接 react-native-secure-randombytes
    3. 从这个链接添加了 react-native-secure-randombytes.podspec
    4. 在 pod 文件中添加了下一个代码:

      pod 'react-native-secure-randombytes', :path => '../node_modules/react-native-secure-randombytes'

    5. 执行“pod install”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-26
      • 1970-01-01
      • 2017-05-30
      • 1970-01-01
      • 2020-01-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多