Phonegap 3 doesn't copy plugins to platforms folder

后端 未结 5 1882
故里飘歌
故里飘歌 2020-12-25 14:33

I\'m using Phonegap3 http://phonegap.com/install/ but I\'m facing an issue with plugins:

After creating project using

phonegap create my-app

相关标签:
5条回答
  • 2020-12-25 15:10

    It is fixed now, the issue was that add plugin command adds to plugin files to platforms project too, so the build command not copying these files during the build phase, so all I had to do is to remove plugins/ folder content and platforms/ content then I did those steps:

    • phonegap local build android
    • phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git

    After all the add plugins commands should run only after all your platforms are added.

    For more information kindly check this

    0 讨论(0)
  • 2020-12-25 15:14

    I ran into the same issue building an iOS app. I've discovered that you won't have this issue if your project name starts with an uppercase letter. As long as the project name starts with an uppercase letter when you create it, you will be able to add plugins later.

    0 讨论(0)
  • 2020-12-25 15:15

    I have to add a third party plugin(barcode) for a project, so i dupliqued other project and removed the folder Android, and then execute "cordova add platform android", but fails with cordova class not found, or another error for the plugin... so i list the plugins with cordova command, and saw all the plugins ok... so? why?.

    The error is remove from explorer or manually... you have to delete from command line..

    This was my solution.. and don´t have to re-add all the plugins... just

    "cordova platform remove android"
    "cordova platform add android" 
    

    and the "android/src/" folder gets populated as "android/bin/classes".. sound strange but works...

    you will note that the results for command lines change for a plugin... example..

    cordova platform add android
    Creating android project...
    Preparing android project
    Starting installation of "cordova-plugin-barcodescanner" for android
    Preparing android project
    cordova-plugin-barcodescanner installed on android.
    

    Cordova Versión 3.3

    0 讨论(0)
  • 2020-12-25 15:24

    I found that I had to update Node.js (download latest from node.js website) then update Phonegap

    npm install -g phonegap
    

    Then reinstall the plugins.

    0 讨论(0)
  • 2020-12-25 15:26

    I had a similar problem, I found I had to add all the plugins before I created a build.

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