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

前端 未结 14 2251
逝去的感伤
逝去的感伤 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:39

    Solution is to make sure there's a www/ directory inside the root directory.

    mkdir www
    

    make sure your .gitignore file doesn't include www/ directory on it.

    0 讨论(0)
  • 2020-12-30 20:41

    Once you create a new project using the create command,you need to change the directory to the newly create project where you are going to build your app.

    eg. E:\Andriod\myapp>cordova create newapp Creating a new cordova project.

    E:\Andriod\myapp>cordova build Current working directory is not a Cordova-based project.

    E:\Andriod\myapp>cd newapp

    E:\Andriod\myapp\newapp>cordova build

    it will be working at this point

    0 讨论(0)
提交回复
热议问题