gpt4 book ai didi

ios - 您可能没有运行此项目所需的环境或操作系统 - Cordova - iOS

转载 作者:行者123 更新时间:2023-11-29 01:08:24 25 4
gpt4 key购买 nike

我正在与 Cordova 合作构建我的移动应用。我正在 Mac 计算机上工作,当我尝试在 iOS 设备上构建和运行我的应用程序时,但我不断收到此错误。
运行时:

cordova build ios

输出:

** BUILD SUCCEEDED **

然后我跑

cordova run ios

我得到了错误

.../ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project

如果我尝试在 Xcode 中打开该项目并运行它,它会在设备上成功运行。

我注意到在运行失败之前,它输出了消息

ios-sim was not found. Please download, build and install 'npm install -g ios-sim'

我猜 Cordova 认为设备没有插入,因为 ios-sim 是 cordvoa 的模拟插件。但我可能错了。

有什么想法吗?

(这个问题类似Cordova: You may not have the required environment or OS to run this project,但是这个问题是关于iOS的,Android的)

最佳答案

尝试

npm install -g ios-sim
npm install -g ios-deploy

我建议你阅读 iOS Platform guide了解更多信息。

关于ios - 您可能没有运行此项目所需的环境或操作系统 - Cordova - iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36073835/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com