Cordova CLI: an error occurred during creation of ios sub-project

前端 未结 4 1980
既然无缘
既然无缘 2020-12-19 07:01

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 comman

4条回答
  •  旧巷少年郎
    2020-12-19 07:24

    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
    

    BTW, you shouldn't need to use sudo here. It would be better to run these commands as a normal user.

提交回复
热议问题