在xcode上删除的React本机项目无法运行"run-ios react-native" [英] React native project deleted on xcode, can't run "run-ios react-native"

查看:230
本文介绍了在xcode上删除的React本机项目无法运行"run-ios react-native"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已删除我的React本机项目,同时尝试使Google地图在.xcodeproje和.xcworkspace的Xcode上正常工作.这意味着我无法运行IOS模拟器.

I've deleted my React native project while trying to make Google maps work on Xcode being .xcodeproje and .xcworkspace. Which means I am unable to run IOS simulator.

我尝试删除Xcode并重新安装,但是找不到在Xcode上的react native项目.尝试链接文件并创建另一个项目,但没有结果.当我尝试构建模拟器时,它给出以下错误.删除的文件中的文件位于ios文件中的我的VS Codde中.

I've tried deleting Xcode and reinstalling but it doesn't find the react native project on Xcode. Tried linking the files and creating another project but no result. It gives the error below when I try building the simulator. The files that were in the deleted file are in my VS Codde within the ios file.

react-native run-ios --simulator="iPhone7"
error Could not find Xcode project files in "ios" folder. Run CLI with --verbose flag for more details.

推荐答案

升级本机项目以恢复已删除的文件.

Upgrade your react-native project to restore your deleted files.

1-删除您的ios和android文件夹

2-在您的项目目录中:

react-native upgrade

3-任何本地依赖项的链接:

react-native link

4-之后:

react-native run-ios

这篇关于在xcode上删除的React本机项目无法运行"run-ios react-native"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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