This post is ‘on request’. In my earlier post on PhoneGap build, I explained steps to generate ipa files and install test apps on iOS without a MAC. In this post I will explain about Android build using Eclipse and Phonegap. For the first time users, make sure you have installed the following:
STEPS TO CREATE ANDROID BUILD
- Assuming you have already installed Eclipse, Android SDK, ADT plugin and Cordova. Let’s create a new PhoneGap project using Eclipse.
- Select Phonegap for Android project from menu.
- Select your installed PhoneGap version. You can also include latest Sencha Touch or Jquery Mobile library if you are using these frameworks for your project.
- Specify a project name.
- Select build target based on your device. You can change build settings based on your device from android properties menu. Android 2.3 or 2.2 works best for me.
- Specify application name and package name. Keep in mind that package name is written ulta.
- After successful creation of project, the project structure looks like this. www is main folder for your project which contains assets folder. index.html is main file for mobile apps.
- You can right click on project and select build for android. If your android device is connected, it will successfully install app in your android device.
Additional useful information:
The android apk is typically saved in
folder of your application.
To check if Android device and SDK is installed successfully you can use
from command prompt. If your device is connected, it will show list of devices connected to your PC. If your device is connected and it doesn’t show any device there’s something wrong. Come back from step 1.
will give you a list of the installed applications, and ApplicationInfo.sourceDir is the path to the .apk file.
Happy Android Building