I upgraded to Phonegap 3.5.0 a few days ago and I found some differences when creating a new project for Android, so after a couple of errors I ended up using this steps to create a new project for Android under Windows 7:
- Download and install Git: http://git-scm.com/download/win
- Download and install Node.js: http://nodejs.org/
- Open a new Ms-DOS window and type:
npm install -g phonegap
- Now create a new project:
phonegap create NewApp com.example.NewApp NewApp
- Enter to the new project directory and type:
phonegap build android
- If we need to add plugins:
phonegap plugin add org.apache.cordova.media
phonegap plugin add org.apache.cordova.file
…
- Build again
phonegap build android
- In Eclipse, create a new project from existing code, and select the project previously created.
- Two projects will appear on the list, MyApp and Myapp-CordovaLib. Select just MyApp, and enable copy to workspace.
- Once imported, go to project properties->Resource->Resource filters and delete the two existing filters (This way we’ll see the www folder in assets).
- Go to project Build Path, and in the source section, add folder and select CordovaLib/src folder of the current project.
- Build from Eclipse to check everything worked.
Your tip on how to import and build under Eclipse was very useful. Thank you.
thanks!
Thank you,
very useful
I struggled half day but your post simply helped to solve in two mins.Thanks a ton !
Thanks for such useful information , i was struggling from past 5 days to setup cordova project in eclipse but finally it is done and compiled without errors..
😉