React Native项目不在当前的IOS模拟器或Xcode上 [英] React native project not on present IOS simulator or on Xcode

查看:173
本文介绍了React Native项目不在当前的IOS模拟器或Xcode上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是更大问题的第二部分,其中第一部分在这里得到解决.

this is the second part of a bigger problem where the first part was solved here React native project deleted on xcode, can't run "run-ios react-native".

我已删除我在Xcode上的项目,可能是.xcworkspace或.xcodeproje.

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproje.

因此,我必须在降级,更新和重新升级我的react版本的同时删除IOS和android文件夹,以重新安装IOS和android文件夹.

Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.

由于仿真器正在工作,但是不幸的是,该项目不在仿真器中,并且Xcode仍然不存在.要指出的一件事是,仅在项目文件夹中cd后,模拟器才会在集成终端中运行,而在普通终端中运行.

Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.

任何人都可以帮助在模拟器和Xcode上重新集成项目.

Can anyone please help re-integrating the project in the emulator and on Xcode please.

这是模拟器在常规终端中运行时的错误:

Here is the error when the emulator is running in a general terminal:

error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

从VS代码集成终端运行时,这是在模拟器中构建项目的错误:

Here is the error for building the project within emulator when ran from VS code integrated terminal:

错误无法构建iOS项目.我们运行了"xcodebuild"命令,但它退出,错误代码为65.要进一步调试构建日志,请考虑通过打开project.xcodeproj

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening project.xcodeproj

推荐答案

在Xcode中,选择"Xcode"菜单,然后选择首选项",然后选择位置"选项卡.单击高级按钮,选择旧版并退出Xcode.

In Xcode, select Xcode menu, then Preferences, then Locations tab. Click on the advanced button, select legacy and exit Xcode.

这篇关于React Native项目不在当前的IOS模拟器或Xcode上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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