Cordova - Current working directory is not a Cordova-based project

前端 未结 14 2405
逝去的感伤
逝去的感伤 2020-12-30 19:56

I\'m using phonegap for my mobile project. My question is why I got this error when I try to search phonegap plugin using cordova CLI? I run this command in terminal to sear

14条回答
  •  醉话见心
    2020-12-30 20:18

    I also had the same problem. i had an angular project. then created a cordova app inside called mobile

    cordova create mobile
    

    Then i tried to run

    cordova platform add android
    

    Which gave me the same error 'Current working directory is not a Cordova-based project'.

    Solution : i have to go to the mobile folder ( from the command prompt cd mobile ) then i had to run the command there. Also there had to be a www folder in that mobile folder

提交回复
热议问题