Cordova CLI:在创建ios子项目期间发生错误 [英] Cordova CLI: an error occurred during creation of ios sub-project
问题描述
我测试了Cordova 3.0.0 CLI工具。
命令
I've tested the Cordova 3.0.0 CLI Tool. The command
$ sudo cordova platform add android
完成。
但在命令过程中出现错误
was done OK. But i've got error during the command
$ sudo cordova platform add ios
错误
[Error: An error occured during creation of ios sub-project. /bin/sh: /Users/user/.cordova/lib/ios/cordova/3.0.0/bin/create: No such file or directory ]
当我决定安装以前的版本时
When I decided to install a previous version
$ sudo npm install -g cordova@2.9.0
是, -
$ cordova platform add ios
我有ios子项目
我安装了Xcode 4.6.3和xCode的命令行工具。
预先感谢任何线索。
I've Xcode 4.6.3 and xCode's Command Line tools are installed. Thanks in advance for any clue.
BTW,我不是孤独的这样的问题。请参阅 - PhoneGap CLI:在创建ios子项目期间出现
错误 https ://groups.google.com/forum/#!msg / phonegap / woWZzT39osg / CpK_rUIKmYAJ
BTW, I'm not alone with such problem. Please see - PhoneGap CLI: "An error occured during creation of ios sub project" https://groups.google.com/forum/#!msg/phonegap/woWZzT39osg/CpK_rUIKmYAJ
更新:
修复:版本化文件夹被删除ie
Update: Fixed: the versioned folder was deleted i.e.
rm -rf ~/.cordova/lib/ios/cordova/3.0.0/
及
$ sudo cordova platform add ios
添加ios平台没有错误。
ios platform was added with no errors.
推荐答案
我在杀死以前的 cordova平台add
命令后遇到了这个问题而不让它完成。它似乎已经部分下载平台文件,但终止它留在不一致的状态。正如你所说,删除该目录然后重新运行命令解决了这个问题。
I had this problem after killing a previous cordova platform add
command without letting it finish. It seems that it had partially downloaded the platform files, but terminating it left it in an inconsistent state. As you mentioned, deleting that directory and then re-running the command resolved the problem.
rm -rf ~/.cordova/lib/ios/cordova/3.0.0/
cordova platform add ios
不应该在这里使用sudo。最好以正常用户身份运行这些命令。
BTW, you shouldn't need to use sudo here. It would be better to run these commands as a normal user.
这篇关于Cordova CLI:在创建ios子项目期间发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!