PhoneGap 3.0 Released - Things You Should Know

This post is more than 2 years old.

Today at PhoneGap Day version 3.0 was released. This is a pretty significant release in terms of the underlying architecture and there are some things you should know.

First - let's start with a few links you should read:

Adobe PhoneGap 3.0 Released
What's New in Cordova iOS 3
Introducing Cordova 3 for Android

Second - there is a new command line tool you will use (or can use I should say, the cordova-cli still works), phonegap. The installation for this is rather trivial if you've got npm already installed:

sudo npm install -g phonegap

This may seem obvious, but phonegap cli is different from cordova cli. Be sure to use the built-in help and sniff around a bit so you see how it does things compared to cordova. This shouldn't take more than a few minutes and you will probably trip up a few times. Thank you, muscle memory.

One of the coolest aspects of the new command line though is that it fully supports PhoneGap Build. What this means is that you can use the command line to build via your terminal with and without the SDKs. Or heck, even if you do have the SDKs and want to use PhoneGap Build, the new PhoneGap cli makes this trivial.

Another useful feature is that if you run phongap as is, you get a quick checklist of what SDKs/platforms you can use locally:


This is the number one thing that I think will trip people up. One of the new things in PhoneGap 3 is a revised plugin architecture. All of the previously core features, like the Camera for example, are plugin based.

When I realized this, my first question was whether a virgin project would include support for the core stuff and expect developers to strip things out (if they cared) or if you would need to implicitly add in support for what you want to use.

Turns out - you need to add in what you want to use. What does that mean practically? As an example, if you try to use it will fail with the "out of the box" project made at the command line.

To fix this you can add in the plugin of course. This takes two seconds and can be done via the CLI. This may not be very clear via the docs. First, the command line docs do talk about the core features as plugins and give you the commands to use... but for cordova, not phonegap.

So as an example, this is the cordova way to add the plugin: cordova plugin add

And this is how you would do it via phonegap: phonegap local plugin add

The net result is that when you start your PhoneGap project, you will want to think ahead of time about the features you need - the previously "just there" features - and add them via the CLI. (As an FYI, it is super easy to remove these plugins too. So if you added the Camera and realize you don't need it, you can quickly remove it.)

For a full list of these plugins, see below. I copied this directly from the link above, so it may change, so please see the link for the most up-to-date version.

Basic device information:

Network and battery status:

Accelerometer, compass, and geolocation:

Camera, media capture, and media playback:

Access files on device or network:

Notifications via dialog box or vibration:



Splash Screen:

In-app browser:

Debug console:

p.s. I've not no idea what the debug console is. Going to research.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Demas posted on 7/21/2013 at 2:09 AM

Shorten url for repo would be nice :)

Comment 2 by Tony Hursh posted on 7/21/2013 at 3:17 AM

Agreed. It should just default to https://git-wip-us.apache.o... unless another prefix is specified.

It'd also be nice if it recognized the Github logins. :-)

Comment 3 by samy omar posted on 7/21/2013 at 6:10 PM

I got an exception when tried to build or run from phonegap CLI
I followed theses steps:

I installed NodeJS successfully on my mac os
on the shell --> $ sudo npm install -g phonegap
then I tried build the app but I got this exception
Here is the code sample

$ phonegap create my-app
$ cd my-app
$ phonegap run android
$ phonegap run android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
[error] An error occured during creation of android sub-project. /bin/sh: /Users/mac/.cordova/lib/android/cordova/3.0.0/bin/create: No such file or directory

Phonegap version is
Macs-MacBook-Pro:hello mac$ phonegap --version
Any suggestions ?

Comment 4 by Raymond Camden posted on 7/21/2013 at 9:45 PM

Not sure. I'd suggest posting to the Google Group. If you get an answer, let us know.

Comment 5 by pmarsh posted on 7/22/2013 at 1:08 AM

Thanks for the article, you mention using :

$ phonegap local plugin add

But then list all the plugins using the cordova CLI. Any reason for the switch? Should users be using the phonegap CLI or stick with the cordova one?

Comment 6 by pmarsh posted on 7/22/2013 at 1:13 AM

Nevermind, missed the "I copied this directly from the link above, so it may change"

Comment 7 by Raymond Camden posted on 7/22/2013 at 1:58 AM

So to be clear, the plugin list is what you want, not the CLI you see me using there. I'm going to edit the list now and remove that so it is more clear.

Comment 8 by pmarsh posted on 7/23/2013 at 5:19 AM

At first glance the debugger plugin let's you log messages using console.log. Don't want to forget that one!

Comment 9 by Raymond Camden posted on 7/23/2013 at 5:23 AM

Yeah, that makes sense. Seems odd we need a plugin for that.

Comment 10 by Todd Hensley posted on 7/25/2013 at 5:05 PM

I'm completely new to PhoneGap, and I'm not totally clear about this.

When I installed PhoneGap 3 on my Mac (from That gave me the "phonegap" cli, but all the documentation at all refers to the "cordova" cli which I don't seem to have.

Can the two cli tools work side by side? On the same project? How would I get the "cordova" cli?

Comment 11 by Raymond Camden posted on 7/25/2013 at 8:14 PM

The docs are still being updated. Yes both can be used - but "typically" you wouldn't need to worry about using both. I'd just use the PhoneGap CLI. I'm finding it simpler and more direct.

Comment 12 by Adrian Parker posted on 7/26/2013 at 1:48 PM

OMG I want to have your babies. I have lost the best part of a day wondering why nothing that touches navigator. works in Phonegap 3 when it worked just peachy in Phonegap 2.9.

Thank you so much for this post.

Comment 13 by Raymond Camden posted on 7/26/2013 at 5:36 PM

@Adrian: Heh, you are most welcome. :)

Comment 14 by Cyril T. posted on 7/27/2013 at 8:30 PM

Thanks for the tutorial. I have a question just in case you came across same thing. on installing phonegap with npm I got the [warning] missing library cordova/android/3.0.0 and indeed after creating an ecplise project org.apache.cordova could not be resolved. Any idea where to get the usual jar file?

Comment 15 by Cyril T. posted on 7/27/2013 at 9:16 PM

After some digging I found a solution to my problem. Just in case it helps some other person (asuming apache ant and phonegap relating things have all been installed):

1. Change into C:\Users\Cyril\.cordova\lib\android\cordova\3.0.0rc1\framework
2. Run 'ant jar'
3. Fix if it fails (most probably JAVA_HOME error - jdk not found)
4. Change into your project C:\my-app
5. Delete your project Android platform C:\my-app\platforms\android
6. Rebuild with phonegap --verbose build android

Comment 16 by Raymond Camden posted on 7/27/2013 at 9:24 PM

Thanks for sharing what you found, Cyril. I *rarely* use Eclipse now for PG development.

Comment 17 by John Farrar posted on 7/29/2013 at 8:46 PM

Is DW or will it soon be ready for PhoneGap 3 dev?

What tools do you use?

Comment 18 by Raymond Camden posted on 7/29/2013 at 9:34 PM

In theory, DW's use of PGB means that once PGB (PhoneGap Build) supports 3.0 then it should "just work". I don't use DW for PG dev so I can't comment more than that. I use the CLI and my favorite editor - Brackets.

Comment 19 by milo posted on 7/30/2013 at 4:17 PM

I'm having trouble installing plugins using CLI
if I use:
$ cordova plugin add https://git-wip-us.apache.o...
i get error:
"git" command line tool is not installed: make sure it is accessible on your PATH.
I managed to install it using:
$ cordova plugin add device
but I have no idea how to install Connection plugin.
Any suggestions?

Comment 20 by Raymond Camden posted on 7/30/2013 at 5:15 PM

First - you probably need to install the Git command line anyway.

Secondly - this post is about the phonegap CLI (well, somewhat), not the cordova CLI.

Third - the Connection API is documented in the usual place. Did you check there?

Comment 21 by Juan posted on 7/31/2013 at 8:42 PM

Hi there.
Nice post!
Can you tell me what is the difference between the phonegap CLI and the cordova CLI.

I installed tow phonegap apps one using 'phonegap create test' and other using 'cordova create test com.test "HelloWorld"'.
I see the create a file phonegap.js and cordova.js but they are actually the same.

Comment 22 by Raymond Camden posted on 7/31/2013 at 10:14 PM

Currently the best "docs" is at the command line. Type phonegap and then phonegap help X for docs.

Comment 23 by Rom V. posted on 8/6/2013 at 8:47 AM

Hi there. How about fastcanvas plugin? What is the .git link?

Comment 24 by barzo posted on 8/6/2013 at 3:26 PM

Cyril thanks for the tip.

Comment 25 by Raymond Camden posted on 8/6/2013 at 3:28 PM
Comment 26 by Erik posted on 8/9/2013 at 4:49 PM

Is it possible to make a Phonegap 3 app with push notifications? I don't see any push plugins listed at https://git-wip-us.apache.o...

Comment 27 by Raymond Camden posted on 8/9/2013 at 5:18 PM

The plugins there are *core* plugins, stuff for PG core features like globalization (which is broken unfortunately) and other things. It isn't for user submitted plugins.

Comment 28 by Erik posted on 8/9/2013 at 5:27 PM

Ok. Guess I have to wait for this issue to get resovled:

Comment 29 by Raymond Camden posted on 8/9/2013 at 5:28 PM

To be clear, that appears to be for PGBuild. If you aren't using Build, then it isn't a problem. (If the core plugin itself was updated for PG 3.)

Comment 30 by Jessica Kennedy posted on 8/16/2013 at 9:19 PM

I, also, volunteer to have your babies! Why would they release such a huge change and not make it exceptionally clear what was going on? Thank you!!

Comment 31 by Raymond Camden posted on 8/16/2013 at 9:38 PM

Heh thanks Jessica. No need to have my babies - I've got 3 and they were delivered by airplane. ;)

Comment 32 by Michael posted on 8/16/2013 at 11:20 PM

Hello Raymond. Invading your blog again. So I have moved all my development to a Mac since that seems to be what all the PG people are doing. I have been able to create both an Android and an iOS Hello World project. Open one in Eclipse and other in Xcode and they both work. Woohoo.

My question is in CLI do we add the plugins when we are cd into the individual project folder or does "phonegap local plugin add..." add the plugin to all projects.

Additionally, if we have existing plugins we are using like Analytics and Push can you point me to where we would add those or even how?

Thanks for your help.

Comment 33 by Raymond Camden posted on 8/16/2013 at 11:26 PM

You are supposed to do it once - not once per platform - and when you build it should do the right thing to copy over. *Should*.

"Additionally, if we have existing plugins we are using like Analytics and Push can you point me to where we would add those or even how?"

Sorry - that I don't know how to do just yet.

Comment 34 by Michael posted on 8/17/2013 at 3:08 AM

Now I just get:

Me$ phonegap local plugin add https://git-wip-us.apache.o...
[error] project directory could not be found

Comment 35 by Michael posted on 8/17/2013 at 3:22 AM

I ran from in the project root folder and it worked.

Comment 36 by Kevin posted on 8/29/2013 at 8:28 AM

Thanks for the post, it was a big help as I struggled all day to move up to cordova 3. I know you are not an Eclipse person, but what I do not get is why the documentation says to create an Android project from existing code, and use the platforms/android directory as the root of the project ( In cordova 3 I should be editing the top-level www folder files and using prepare or build to push the entries down to my target platforms no? Seems like I am losing the main advantage of the new process - to edit files in one place?

Comment 37 by Raymond Camden posted on 8/29/2013 at 3:36 PM

You are right. Can I ask you file a documentation bug for it at

Comment 38 by Analytics plugin in Cordova 3. posted on 9/5/2013 at 2:57 PM

Hi Raymond, I'd really like to know how to install Google Analytics plugin in my Phonegap 3.0 project.

I can't believe they would just launch a new version and not have this stuff available. Where's the source? Where's the manual? Where's the reference in the docs?

Thanks for any pointers!

Comment 39 by Raymond Camden posted on 9/5/2013 at 3:44 PM

To be clear, plugins like this are NOT built by the PG/Cordova team. They are built by people in the community. You can't blame the PG team for this as it is up to the plugin author to ensure their code works with the latest version.

I assume your question about the manual/docs are referring to the plugin docs, and again, that is *not* the responsibility of the PG team. You need to find the plugin home and check there.

Comment 40 by Analytics plugin in Cordova 3. posted on 9/5/2013 at 3:50 PM

Fair enough, thanks for the perspective Raymond!

I agree that 3rd party plugin builders should keep their code up to speed. But what's missing from the Cordova docs is any kind of explanation about how plugins for 3.0 are to be installed. At least, I am assuming that this has changed since Cordova's own plugins (for things like Camera) have been completely redesigned.

Comment 41 by Raymond Camden posted on 9/5/2013 at 3:55 PM

I haven't yet done a custom plugin with PG3. It may/should work the same as built in plugins - ie you use the phonegap CLI to install it.

Comment 42 by Michael posted on 9/5/2013 at 7:26 PM

I kind of disagree a little with, "You can't blame the PG team for this as it is up to the plugin author to ensure their code works with the latest version."

I understand what you are saying, but 3.0 changed so much that the huge repository of plugins that add significant value to using PhoneGap became useless. That doesn't seem like a smart move. It seems PhoneGap could proactively work with these plugins to bring them up to snuff, especially the ones that are used a lot like analytics. Taking the stance of, "hey it's not our problem none of the stuff you use doesn't work" doesn't really help people use PG.

Doesn't the ratio of plugins updated to 3.0 seem like a sad commentary on what the development community thinks?

Comment 43 by Raymond Camden posted on 9/5/2013 at 7:41 PM

I think it depends on how big those changes were. I do *not* write plugins so I can't comment on how difficult the process was. I'd be happy to hear from any plugin dev who wants to comment on the process. I _do_ develop plugins (well, extensions) for other projects and when the API changes, I try to make changes to ensure my code works. At the end of the day though it is my responsibility.

Comment 44 by dhwnaik gandhi posted on 9/16/2013 at 10:37 AM

is there any possibilities for launching of CORDOVA-3.0.0 AND CORDOVA-3.0.0.JAR ??

Comment 45 by Raymond Camden posted on 9/16/2013 at 5:54 PM

I'm sorry but I have no idea what you mean.

Comment 46 by Qrux posted on 9/18/2013 at 10:00 AM

Thank you for your guide. It looks to have been really helpful for many people. I got lucky and found this information elsewhere, but indeed, it is critical to know.

On the subject of critical-to-know information, I have no idea how to get 3rd party plugins working on 3.0.0.

I installed plugman. I think I "installed" the plugin I want (BarcodeScanner). And my app stopped working.

From there, I proceeded to take out all the references to the plugin (the new <feature> tag in the config.xml, the <script> tag that refers to barcodescanner.js). And even then, none of the JS in my app appears to be working. I will keep trying to figure this out.

In the meantime, is there any place to get good, authoritative--and confirmed--information on using 3rd party plugins with PG-3.0.0? My app is darn near useless without it, and I'd love to see the docs. At the very very least, it'd be nice to know the roadmap for docs.

On a software engineering note, I disagree that the plugin situation is entirely, as you seemed to imply, in the hands of the plugin devs. Every platform knows it would be immediately dead-in-the-water without 3rd party apps. It's why they have "Early Developer" releases and "pre-launch SDKs" and all other manner of things of this sort. To simply put one's hands up and say that it's someone else's responsibility is a terrifying attitude for a platform to have.

Imagine if PS or LR immediately broke all their plugin compatibility with a new release without a pre-release period where their plugin developers could make their code work. That'd be pretty appalling. I realize that PhoneGap/Cordova (could someone straighten this naming out, BTW?) is all 2.0/social-media/Millennial dev-style, but on the surface, this seems to be an unhealthy regard for the 3rd party developer community. Until Adobe is writing all the plugin content, it would seem unwise.

Having said that, I'm sure that wasn't your intent. It just came off callous. I'd appreciate, again, any information you have that would help us all use 3rd party plugins with PhoneGap 3.0.0.

Thank you.

Comment 47 by Qrux posted on 9/18/2013 at 11:19 AM

Here's an update to my previous post. I was able to resolve some issues, specifically the part where I said _"none of the JS in my app appears to be working"_.

The recap goes like this. While installing the 3rd party plugin specifically for iOS, I used plugman incorrectly from the command line. Unfortunately, it did *not make me aware of the fact that it destroyed my core plugin specification file.* This seems like a very very bad side-effect from a possibly common user-error. Seems like some guards would be useful here.

I discovered this when, out of pure frustration, I switched over to my Git window to change repos (get my mind off the immediate problem). I noticed that a file I was unfamiliar with changed. In that file were all the core plugins I had installed (via phonegap local plugin add ...). And, that file had no entries where the there were entries before. I used Git to restore the file, and...voila! JS is working, and now I'm on the next step, debugging why the barcode scanner isn't working quite right. That may prove to be *actual* user error.

I hope this can help someone.

Comment 48 by Raymond Camden posted on 9/19/2013 at 6:10 PM

Qrux, I had problems with plugins in 3.0 as well:

Comment 49 by Vivian posted on 9/25/2013 at 5:00 AM

About the error
[error] An error occured during creation of android sub-project. /bin/sh: /Users/mac/.cordova/lib/android/cordova/3.0.0/bin/create: No such file or directory

I went into the finder and looked for the path, there is a directory "cordova-ios-3.0.0-26df4e2" (I was configuring ios platform, and come across this issue), and the bin directory is in this directory. so I move all file of cordova-ios-3.0.0-26df4e2 into directory 3.0.0, and it works.

Comment 50 by daryl posted on 10/9/2013 at 8:37 PM

Just installed node, ant, jdk, etc.
Everything works great unitl i try to add plugin.

C:\test1>phonegap local plugin add https://git-wip-us.apache.o... -V
[phonegap] adding the plugin: https://git-wip-us.apache.o...
[phonegap] Calling plugman.fetch on plugin "https://git-wip-us.apache.o..."
[error] Error fetching plugin: Error: failed to get the plugin via git from URL https://git-wip-us.apache.o..., output: Cl
oning into 'plugman-tmp1381333976632'...
fatal: unable to access 'https://git-wip-us.apache.o... Failed connect to; No error

Have tried numerous variations. All fail.
phonegap can connect over https without any issues. It successfully connects and downloaded a missing package. I believe this means it can get through our proxy server OK.

Any help would be greatly appreciated.

Comment 51 by Raymond Camden posted on 10/10/2013 at 12:03 AM

Are you on VPN? My corporate VPN blocks access to some Git servers.

Comment 52 by Analytics plugin in Cordova 3. posted on 10/10/2013 at 9:27 AM

Figured one easy way: ignore the "installation" process for plugins, and just download the files, then place them in the right subdirs.


Both these folders are siblings of folders that contain the native plugin, but this folder will be the one where you put all your custom plugins.

Then, for Android, add a "feature" to the config.xml file, but not the one in /www.

The correct folder is:

In my case, the feature is called SoftKeyBoard. The format of the feature is as follows (it uses the Java filename):

<feature name="SoftKeyBoard">
<param name="android-package" value="org.apache.cordova.plugin.SoftKeyBoard" />

I haven't repeated this step for iOS, but using your powers of deduction you might get quite far.

Good luck!

Comment 53 by daryl posted on 10/10/2013 at 5:42 PM

Hi Ray,

I am not on a VPN.

We discovered yesterday that the git clone can download the packages without issue. We can then use phonegap to add the local packages without issue.

I believe the problem is in the scripting that phonegap uses to access the packages through https.

In any event, we have documented the process for internal use and can move forward with our migration project.

Thanks for the blog. It is helpful to understand how others solve their problems.


Comment 54 by zuhair posted on 10/16/2013 at 3:49 AM

after I run this two command lines:
phonegap local plugin add
phonegap local plugin add
the plugins folder is still empty! How can I know if the plugins added? is there any changes at config.xml should appears?

Comment 55 by Raymond Camden posted on 10/16/2013 at 5:59 AM

Did you see any errors? Any result at all after running the command?

Comment 56 by J. Blake Harris posted on 10/16/2013 at 10:02 AM

I'm at the end of my rope. I've rebuilt both Phonegap and Cordova 3.1.0 projects repeatedly in Xcode 5, and everything is great except sound. I've tried the Media plugin and LowLatencyAudio and they both freeze without any error codes, with MP3s and MP4s. My question is do some plugins such as the CDVSound (Media plugin) require other plugins? Nothing at all is being logged so I am assuming the file can't be located for some reason.

Comment 57 by Raymond Camden posted on 10/16/2013 at 5:39 PM

Both of those plugins may not be updated for 3.0. Have you checked with their authors? I hate to sound like I'm saying "Go away", but technically, for stuff like this, external plugins, your best option is to always check with the individual authors.

Also - check with my coworker and buddy Andrew Trice (, I spoke with him a few days ago and he was doing something with an audio plugin. I don't know if it is the exact same plugin, but it may be related.

Comment 58 by J. Blake Harris posted on 10/16/2013 at 7:10 PM

The CDVMedia plugin is not an external plugin.

My question was really if some of the plugins could be broken without other plugins. Could the CDVMedia plugin fail to locate a resource because the CDVFile plugin is not installed, for example.


Comment 59 by Raymond Camden posted on 10/16/2013 at 7:15 PM

I'm sorry J, I didn't recognize the name. I think you are absolutely right - that it may need the file plugin. Obviously it should be quick to test, right?

Comment 60 by J. Blake Harris posted on 10/16/2013 at 7:25 PM

That is where I am now. The CDVFile plugin has about 20 javascript files and not a lot of documentation. Thanks again.

Comment 61 by zuhair posted on 10/16/2013 at 10:09 PM

I'm using Windows 8, and when I put this at command:
phonegap local plugin add https://git-wip-us.apache.o...
I got this :
Error fetching plugin: Error: "git" command line tool is not installed: make sure it is accessible on your PATH.
somebody says that I've to download git:
but the same result at output.

Comment 62 by zuhair posted on 10/16/2013 at 10:14 PM

when I put
local plugin list
nothing appears

Comment 63 by Raymond Camden posted on 10/17/2013 at 1:39 AM

After you downloaded git, did you remember to rerun the plugin add call?

Comment 64 by zuhair posted on 10/17/2013 at 1:03 PM

yes I tried
this is an image:

Comment 65 by Raymond Camden posted on 10/17/2013 at 2:46 PM

It looks like you did not install Git correctly. I'd do so again. If you can't type "git" in your command window and not get an error, then you aren't ready yet.

Comment 66 by Krish posted on 10/22/2013 at 1:59 PM

Struggling a bit to get an app running on Ripple emulator with PhoneGap 3.0 - it's not calling the deviceready event. Any suggestion?
Kind Regards, Krish

Comment 67 by Raymond Camden posted on 10/22/2013 at 2:01 PM

Ripple is currently broken for PG 3 (well, PG2.7 and higher). I'm on the developer list (it is an open list at Apache) and an update is coming soon. When it does - I'll blog here.

Comment 68 by Paul de Jong posted on 11/6/2013 at 3:27 PM

Don't know if this has been posted yet but adding plugins can be done without full git repo urls as follows:

phonegap local plugin add org.apache.cordova.file

lookup de plugin id (e.g. org.apache.cordova.file) at

Works great, just like a package manager!

Comment 69 by Michael posted on 11/6/2013 at 9:53 PM

I don't get the organization of It just seems like anyone can add whatever in there. Like what is error: forbidden or com.zjf?

Comment 70 by Raymond Camden posted on 11/6/2013 at 11:58 PM

Michael, I believe the developers are working on some updates to the site to make it a bit more sensible.

Comment 71 by samy omar posted on 11/8/2013 at 11:47 PM

replying to my post above, I have fixed my issue buy uninstalling node from my mac then reinstalled it again following thes instructions

I dont know exactly where is the root cause, but I think it was an issue in the node.js cashing for phonegap.

Comment 72 by Charan Giri posted on 2/11/2014 at 9:37 AM

I'm an iOS developer, new to phone gap i have followed Cordova cli , when i try to add android platform i get below error , how to fix it i struck here for last 2 days can you help me with this please.

cordova platform add android
Error: ENOENT, no such file or directory '/Users/charan.pathapati/.cordova/lib/android/cordova/3.3.0/VERSION'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at /usr/local/lib/node_modules/cordova/src/platform.js:257:42
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:821:14
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)

$ cordova emulate android

Error: The provided path "/Users/charan.pathapati/hello/platforms/android" is not an Android project.
at Object.android_parser (/usr/local/lib/node_modules/cordova/src/metadata/android_parser.js:37:15)
at /usr/local/lib/node_modules/cordova/src/prepare.js:50:23
at (native)
at Object.prepare (/usr/local/lib/node_modules/cordova/src/prepare.js:48:35)
at /usr/local/lib/node_modules/cordova/src/emulate.js:93:42
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)

Comment 73 by Raymond Camden posted on 2/12/2014 at 2:36 AM

I assume you've followed everything in the platform guide, right?

Comment 74 by Michael posted on 2/14/2014 at 1:16 AM

Here is an odd one.

I ran a Cordova update and now see:
cordova -v

I go into a project root folder and do:
cordova platform update ios
ios updated to 3.3.0


Comment 75 by Raymond Camden posted on 2/14/2014 at 1:21 AM

*boggle* got me there. Report it on the Google group?

Comment 76 by Satyanarayan Dash posted on 2/18/2014 at 11:47 PM

Hi Raymond
I have problem with the recent cordova version.Previously i mde cordova projects from th bin folder and any kind of plugins through cordova plugin add and phonegap local plugin add command.But not when i create a project in new cordova version it includes many extra folders and a cordovaLib folder dependency which is creating the problem i think.

And for push plugin previously i used phonegap but now when it is showing project folder not found.
So i don't know what is going on after the updation of cordova and phonegap.Can you help me out.

Thanks in advance

Comment 77 by Raymond Camden posted on 2/20/2014 at 1:28 AM

@Satyanarayan - I honestly don't understand what you are saying. When I use cordova create, I get folders: hooks, merges, platforms, plugins, and www.

Comment 78 by Satyanarayan Dash posted on 2/20/2014 at 9:11 AM

@Raymond i am extremely sorry for my confusing questions.but i got my issue and degrade my phonegap and cordova version so that now i can install plugins easily through command line.
But one thing i marked in cordova 3.3 is it creates a .staging folder and cordovaLibs folder within platform>android folder which was not there in case of cordova 3.2.

i suspect about that .staging folder which is creating the bugs.So can you tell me about the new .staging folder


Comment 79 by Raymond Camden posted on 2/21/2014 at 3:31 AM

Not sure what to say - when I make a new Cordova project I only see what I told you above.

Comment 80 by Eni posted on 3/13/2014 at 8:52 PM

When I try to install the plugin in my cordova project i get the following error :
Error: Command failed: Cloning into 'C:\Users\Enedia\AppData\Local\Temp\plugman-tmp1394732645631'...
fatal: unable to access 'https://git-wip-us.apache.o... Could not resolve proxy: proxy
I am trying to test it locally, so what should be the proxy settings?

Comment 81 by Raymond Camden posted on 3/14/2014 at 12:53 AM

It sounds like git is failing to load the repo. Do you have a firewall?

Comment 82 by Eni posted on 3/14/2014 at 2:34 AM

Yes I have the firewall its active.Should I deactivate it?

Comment 83 by Eni posted on 3/14/2014 at 2:45 AM

firewall is not the issue because i disabled it and I still get the same error. :/

Comment 84 by Eni posted on 3/14/2014 at 4:01 AM

nevermind, i fixed it with this command git config --global --unset http.proxy
thanx :)

Comment 85 by Raymond Camden posted on 3/14/2014 at 5:36 AM

I like how you thank me even though you fixed it yourself. ;) Seriously though - thanks for sharing what worked for you!

Comment 86 by Mitresh Joshi posted on 4/3/2014 at 9:04 AM

when i add a plugin via CLI it gets added in the plugin folder which is a subdirectory under "myapp" folder. However there are two www folder. One under "myapp" and other is created under platforms/ios/www/plugins. for example when i add device plugin, the Device.m and .h files are actually under myapp/plugins/src/ but under xcode on the left panel under plugins it shows both the files as red (not found) cos the path they pick is myapp/platform/ios/www/plugin

plugins are added automatically under myapp/plugins/, but then why xcode is pointing to the plugin folder under platforms/ios.

also the index file under platforms/ios is considered, then why it creates www outside as well under myapp/www

Comment 87 by Raymond Camden posted on 4/3/2014 at 2:40 PM

"owever there are two www folder. One under "myapp" and other is created under platforms/ios/www/plugins"

I do not see this. I do see a www folder under the root of my project. I do not see a www folder under /platforms/ios/www/plugins. Instead I see the plugin folder. Maybe you misspoke?

"also the index file under platforms/ios is considered, then why it creates www outside as well under myapp/www"

This makes absolutely no sense to me.

Best I can suggest is ensure you are running the latest Cordova. It works for me, and has for a while now.

Comment 88 by Rafael Cereceda posted on 4/7/2014 at 4:00 PM

Hi Raymond,
First of all, thanks for all your good work.
I've made an app in Cordova 2.9 for iOS and Android. In each of them I used some specific features for each platform. For instance, I've included Google Analytics in both platforms but with a different way of doing it. And, in Android I customized the main activity so I could access to preferences in a native way... things like that. But in both versions, the www folder contains the same files, so when I wanted to modify something in the html/javascript code, I had to copy it to the www folder of the other platform,...

With the new structure of Cordova, I guess that the way of working with it should be:
1. Create a new app.
2. Place your html/javascript code in the www folder of the app.
3. Build the app for each platform you want.
4. Customize each platform.

Now, I'd like to know how would be the process from that point, when I only want to update my html/javascript code (Have I to do it only in the main www folder? or, in each of the platform www folder?), without losing the changes in the customized "native" code of each platform.

I hope the question would be clear enough. If not, just let me know it.
Thank you very much in advance,

Comment 89 by Raymond Camden posted on 4/7/2014 at 4:06 PM

What about using the merges folder? This is documented here -

Comment 90 by Rafael Cereceda posted on 4/7/2014 at 6:08 PM

Thanks for your quick response!

It's not exactly what I was thinking of. It customizes the code in the main www folder for each platform and what I want is to update all of each platform www folder with the same content, but preserving the Java code I've modified in the Android/iOS platform files.

Reading the site you mentioned, raised another question or, prehaps, the same question: The command "cordova platform update android",
is only used to upgrade to new versions of Cordova?
can it be used to copy the files in main www folder (with the correspondent differences made through "merges" ) to each platform ones?
how does it affect to the changes I've made in the Java files for each platform?

Comment 91 by Raymond Camden posted on 4/7/2014 at 6:32 PM

I think you are right about merges, and if so, sorry for the misdirect there. If you are planning on customizing your platforms, you may want to skip using the cordova CLI to do builds as it will blow away your mods. You could write your own shell script to copy just the www bits perhaps?

"The command "cordova platform update android",
is only used to upgrade to new versions of Cordova?
can it be used to copy the files in main www folder (with the correspondent differences made through "merges" ) to each platform ones?"

Um, I believe the answer to the first one is yes. For the second one, I don't think it works that way.

Comment 92 by Rafael Cereceda posted on 4/7/2014 at 9:22 PM

Raymond, thanks a lot for your interest and your answer. It gives me a hint of what can I expect and what I shouldn't do... I'll keep looking for an answer to my last question, because the it bothers me the possibility of missing all I've done, in the platform level, when upgrading to a new version of Cordova.

Thanks again!

Comment 93 by sinan do?anl? posted on 6/9/2014 at 2:41 AM

I am creating an app and adding the plugin.
but I cant use when I try with "phonegap developer app"

I am using build service, but after that I want to make local test with phonegap developer app what should I do?

Comment 94 by Raymond Camden posted on 6/9/2014 at 3:57 AM

Custom plugins (ie, outside the core) are not supported.