简体   繁体   English

在当前的IOS模拟器或Xcode上不反应原生项目

[英]React native project not on present IOS simulator or on 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上删除React本机项目,无法运行“run-ios react-native”

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproje. 我在Xcode上删除了我的项目,可能是.xcworkspace或.xcodeproje。

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. 因此,我不得不删除IOS和android文件夹,同时降级,更新和重新升级我的反应版本以重新安装IOS和android文件夹。

Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. 由于模拟器正在运行,但不幸的是,该模型中没有该项目,并且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. 需要指出的一点是,模拟器仅在集成终端中运行时才会出现,而在项目文件夹中进行cd-ing后也不会出现在通用终端中。

Can anyone please help re-integrating the project in the emulator and on Xcode please. 任何人都可以帮助重新整合项目在模拟器和Xcode上。

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

Here is the error for building the project within emulator when ran from VS code integrated terminal: 以下是从VS代码集成终端运行时在模拟器中构建项目的错误:

error Failed to build iOS project. 错误无法构建iOS项目。 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 我们运行了“xcodebuild”命令,但退出时出现错误代码65.要进一步调试构建日志,请考虑使用Xcode.app构建应用程序,方法是打开project.xcodeproj

In Xcode, select Xcode menu, then Preferences, then Locations tab. 在Xcode中,选择Xcode菜单,然后选择Preferences,然后选择Locations选项卡。 Click on the advanced button, select legacy and exit Xcode. 单击高级按钮,选择legacy并退出Xcode。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM