找不到React/RCTBridgeDelegate.h'文件 [英] React/RCTBridgeDelegate.h' file not found

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

问题描述

我在终端上使用react-native init auth创建了一个名为auth的新项目.当我尝试使用react-native run-ios运行该项目时.构建失败,并提供了一个错误"React/RCTBridgeDelegate.h"文件.

I have created a new project called auth using react-native init auth at terminal.When i tried to run the project using react-native run-ios. The build failed and gave a error 'React/RCTBridgeDelegate.h' file not found.

试图更新react native版本

Tried to update the react native version

在Mac终端上的本机run-ios

react-native run-ios at terminal in mac

我希望构建成功并查看ios模拟器 我得到的实际结果是构建失败,因此无法看到模拟器

I expect the build to be successful and see the ios simulator The actual result which i got is build failed and hence cant see the simulator

推荐答案

该问题与cocoapods依赖项管理器有关. 打开终端,然后转到项目ios控制器,然后键入"pod init"(如果不存在),然后键入"pod install",然后打开工作区项目并从ios文件夹中删除构建并运行react-本机运行iOS.它应该工作.

The issue is related to cocoapods dependency manager . open the terminal and then go to your project ios director, and then type "pod init" (If it doesn't exist) and then "pod install" and then open the workspace project and delete the build from ios folder and run react-native run-ios. It should work.

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

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