找不到“EXUpdates/EXUpdatesAppController.h"文件 [英] 'EXUpdates/EXUpdatesAppController.h' file not found

查看:27
本文介绍了找不到“EXUpdates/EXUpdatesAppController.h"文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为MyReactNative"的反应原生项目.我更新了 react 本机版本(~0.63.3),之后在运行 iOS 代码时出现以下错误:

I have a react native project named 'MyReactNative'. I have updated react native version(~0.63.3) and after that I am getting an error below while running iOS code:

找不到EXUpdates/EXUpdatesAppController.h"文件

这就是我的 package.json 的样子:

This is how my package.json looks like:

{
  "main": "index.js",
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "start": "react-native start",
    "test": "jest",
    "build:ios": "node node_modules/react-native/local-cli/cli.js bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'"
  },
  "dependencies": {
    "@react-native-community/cli-platform-android": "^4.13.0",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/native": "^5.8.10",
    "@react-navigation/stack": "^5.12.8",
    "axios": "^0.19.0",
    "babel-preset-react-native": "5.0.2",
    "local_package": "file:../local_package-1.6.0.tgz",
    "expo": "~39.0.2",
    "expo-splash-screen": "~0.6.2",
    "expo-status-bar": "~1.0.2",
    "expo-updates": "^0.3.5",
    "nodemon": "^1.18.10",
    "npm-install-peers": "^1.2.1",
    "prop-types": "^15.6.0",
    "react": "17.0.1",
    "react-devtools": "^3.6.1",
    "react-dom": "16.13.1",
    "react-native": "~0.63.3",
    "react-native-axios": "^0.17.1",
    "react-native-easy-toast": "^1.2.0",
    "react-native-enhanced-popup-menu": "^0.6.1",
    "react-native-gesture-handler": "^1.7.0",
    "react-native-reanimated": "^1.13.2",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-screens": "^2.10.1",
    "react-native-unimodules": "~0.11.0",
    "react-native-web": "~0.13.12",
    "underscore": "^1.9.1"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "babel-jest": "~25.2.6",
    "jest": "~25.2.6",
    "react-test-renderer": "~16.13.1"
  },
  "jest": {
    "preset": "react-native"
  },
  "private": true
}

而 podfile 看起来像:

And podfile looks like:

# Uncomment the next line to define a global platform for your project
# platform :ios, '10.0'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'MyReactNative' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
 
  config = use_native_modules!
  use_react_native!(:path => config["../node_modules/react-native"]) 
end

我试过网上给出的解决方案如下:

I tried solution given on internet as below:

反应原生 ios 构建失败并出现错误 - '未找到 EXUpdates/EXUpdatesAppController.h' 文件

https://docs.expo.io/bare/installing-updates/

还尝试重新安装节点模块和 pod.不幸的是,没有什么对我有用.请帮忙!

Also tried reinstall node module and pods. Unfortunately, nothing work for me. Please help!

推荐答案

在对 podfile 进行以下更改后,我能够运行我的项目:(添加了 use_unimodules!)

I am able to run my project after doing below changes in podfile:(Added use_unimodules!)

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'MyReactNative' do
  #use_frameworks!
  use_unimodules!
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])
  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  #use_flipper!
  #post_install do |installer|
   # flipper_post_install(installer)
  #end
end

再次运行 pod install.

Run pod install again.

这篇关于找不到“EXUpdates/EXUpdatesAppController.h"文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆