First Use of Android! Hello android.

Here is a simple flow to install, create project, run project..

1. Download the Android

http://developer.android.com/sdk/1.5_r1/index.html

 

Choose the right one with the specified OS.

 

2. Install the Android.

Just unpack the zip to a specified folder.

 

3. Set the tools to system path

If you want to use command of android directly, you can set the %Android%/tools to the system path.

 

4. Create project without eclipse plugin

Just use the following command to create a project named "HelloAndroid"

android create project --package com.android.helloandroid --activity HelloAndroid --target 2 --path c:/test/HelloAndroid

It's easy to understand the params. if you have any question, please visit the development center.

 

5. Build a certain version of android app

Use the following command to buid a debug version

ant debug

Use the following command to build a release version

ant release

 

6. Check the targets

Use the following command to view all the targets(devices).

android list targets

 

7. Create an avd

Use the following command to create an avd(Android Virtual Device ), and choose a target.

android create avd --name my_avd --target 2

 

8. Run your emulator, remember to specified your avd name.

emulator -avd my_avd

 

9. Install your app to emulator

adb install %Project_Path%/HelloAndroid-debug.apk

 

Alternately, you also can use

ant install

to instead of step 5 and step 9

 

then you will see the icon in your android phone!!!!

Android

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值