24 Kasım 2013 Pazar

How to Create&Develop a Phonegap HelloWorld Project

  1. Install PhoneGap. You need NodeJs package manager installed.

    npm install -g cordova
  2. Create  a project named "HelloWorld" inside "phonegap-example" directory. Use "com.example.hello" root package.

    phonegap create phonegap-example --id com.example.hello --name HelloWorld
  3. Add android support

    cd phonegap-example
    cordova platform add android

  4. Build the project

    cordova build

  5. Run the project. You need Android Development SDK installed.

    cd ./platform/android/cordova
    In case, you don't have an android emulator defined in your development environment, you may get following error:

    ERROR : No emulator images (avds) found, if you would like to create an  avd follow the instructions provided here:
     Or run 'android create avd --name <name> --target <targetID>' in on the command line.

Hiç yorum yok: