Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap 3 doesn't copy plugins to platforms folder

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

After creating project using

phonegap create my-app

phonegap local build android

then I added a camera plugin using

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

http://docs.phonegap.com/en/edge/cordova_camera_camera.md.html#Camera

then build project using phonegap local build android

it was working fine but suddenly it stopped working, after investgating the issue I found that plugins are not copied to the android project although I can list all plugins using

phonegap local plugin list
like image 226
Hazem Hagrass Avatar asked Aug 18 '13 16:08

Hazem Hagrass


2 Answers

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

like image 147
Hazem Hagrass Avatar answered Oct 18 '22 04:10

Hazem Hagrass


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.

like image 23
Dan Brady Avatar answered Oct 18 '22 04:10

Dan Brady