I am trying to create an Android project on Windows using Cordova 2.2.0 (PhoneGap). According to this blog post this command should work –
create <project_folder_path> <package_name> <project_name>
But I am getting a message “Project already exists!”. I have used the same PC to create, package and submit an Android app so I know I have Java, Javac, Ant, Android e.t.c. installed.
I have also tried this on a Mac with Cordova 2.1.0 and there I get the message “An error occurred. Deleting project..”
Could you please suggest what might be the cause of this error and a possible fix?
Thanks.
UPDATE
This problem seems to be fixed in Cordova 2.2.0 but I haven’t found a workaround for 2.1.0
To be clear, your target project path should be to be where you want the project to be created and then the last directory will be what you want to be created. For example:
In this case you want to create a project in the current directory in a new folder called “test2” and this folder has not been created yet (it will be created when this is run).
UPDATE: If you are using a newer verison of the Cordova Edge or greater, i highly recommend using the Cordova CLI Utility here: http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-Line%20Interface