所以我安装了PhoneGap 3.0.0:
sudo npm install -g phonegap
然后我创建了一个项目:
phonegap create Test com.example.test Test
这创建了包含以下文件夹的文件夹:
然后我为iOS构建了项目:
phonegap build ios
我收到以下错误:
[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] adding the iOS platform...
[error] An error occured during creation of ios sub-project. /bin/sh: /Users/dbank/.cordova/lib/ios/cordova/3.0.0/bin/create: No such file or directory
果然,当我去这个文件夹(... / cordova / 3.0.0)时,没有bin文件夹。
当我输入'phonegap'命令时,我看到以下内容:
keyword | local environment | remote environment
------------------------------------------------
ios | Yes | Yes
我可以告诉我为什么在安装phonegap时我没有这个bin文件夹?
答案 0 :(得分:3)
对于那些在这个问题上遇到困难的人,10gistic的评论是正确的。我需要删除根目录中的.cordova文件夹。在我这样做之后,我能够成功构建iOS子项目。
请参阅以下StackOverflow问题:Cordova CLI: an error occurred during creation of ios sub-project