[Error: Current working directory is not a Cordova-based project.]

前端 未结 9 1520
不知归路
不知归路 2020-12-17 07:52

I created a Phonegap project according to instructions, checked it into SVN, checked it out and then discovered I could no longer run the build command--necessary to have ch

相关标签:
9条回答
  • 2020-12-17 08:14

    In my project I had nothing in www, so when I put into git the www folder was missing. I put a .gitignore into www and pushed, than it worked.

    0 讨论(0)
  • 2020-12-17 08:19

    To complete other answers, this thread will help you understand what should be put in version control or not. The .cordova file should rather be versionned to avoid this kind of problems.

    What parts of cordova cli generated projects can be safely versioned in source control?

    0 讨论(0)
  • 2020-12-17 08:25

    I experienced this problem when working in an Xcode project that somehow didn't build properly with the needed Cordova files. While the existing Cordova plugins are working, installing new ones does not.

    My example is for the InAppBrowser plugin.

    What I did:

    1. Created a new cordova project with cordova create .
    2. Install the needed plugins in that directory with cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git
    3. Go to the plugins folder in that root directory and copy the plugin folders to the plugin folder of your Xcode project. (e.g org.apache.cordova.PLUGIN_NAME)
    4. In the plugin specific folder (inside plugins directory) copy the source files to the Plugins folder inside Xcode (just drag and drop them in and copy to the targets you need)
    5. Be sure to make the necessary changes to your config.xml file (the plugin documentation should tell you)
    6. Rebuild and run - plugin should be working fine

    Hope this helps!

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