首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“‘EXUpdates/EXUpdatesAppController.h”文件未找到

“‘EXUpdates/EXUpdatesAppController.h”文件未找到
EN

Stack Overflow用户
提问于 2020-11-27 12:14:59
回答 1查看 3.4K关注 0票数 0

我有一个名为“MyReact原住民”的反应本地项目。我已经更新了react本机版本(~0.63.3),在此之后,在运行iOS代码时,我在下面得到了一个错误:

未找到'EXUpdates/EXUpdatesAppController.h‘文件

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

代码语言:javascript
复制
{
  "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看起来是:

代码语言:javascript
复制
# 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

我尝试了在互联网上给出的解决方案如下:

react native ios build fails with error - 'EXUpdates/EXUpdatesAppController.h' file not found

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

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-12-01 04:59:56

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

代码语言:javascript
复制
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

再次运行吊舱安装。

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65037196

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档