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

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

问题描述

这是一个更大问题的第二部分,第一部分在这里解决 React Native 项目已在 xcode 上删除,无法运行run-ios react-native".

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-ing 后在一般终端中不出现.

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 退出.要进一步调试构建日志,请考虑使用 Xcode.app 构建您的应用程序,方法是打开 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 菜单,然后选择 Preferences,然后选择 Locations 选项卡.点击高级按钮,选择 legacy 并退出 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天全站免登陆