SyntaxHighlighter JS

2013-01-27

Android Mac Command Line

1.) Launch Android SDK Manager to download additional libraries and SDK versions

$ANDROID_SDK_PATH/tools/android sdk

2.) List Android SDK targets to create AVD (Android Virtual Devices)

$ANDROID_SDK_PATH/tools/android list targets

3.) Create AVD

$ANDROID_SDK_PATH/tools/android create avd -n avdName -t targetID 

4.) Start the AVD emulator

$ANDROID_SDK_PATH/tools/emulator -avd avdName

5.) Generate Android project build.xml if missing

$ANDROID_SDK_PATH/tools/android update project -p projectPath

6.) Compile Android project if build.xml exist

ant debug

7.) Install Android on emulator

ant debug install

or 

$ANDROID_SDK_PATH/platform-tools/adb install projectPath/bin/AppName.apk

Useful parameters

-r : Reinstall
-d: Install on USB device
-s emulatorID : Specifies emaulator ID in case running multiple emulators

8.) If running multiple emulators, see all emulators ID

$ANDROID_SDK_PATH/platform-tools/adb devices

No comments:

Post a Comment