You are on page 1of 5

Bi 1.

To v chy project android


1. File / New /Project

2. Android/Android Project /Next

3. Project Name (tn project) g: myproject1 ri Next C th chn cc radio button bn di to project mi, hoc to prject t 1 source hoc t mt v d. B chn User default location nh li ng dn cho project

nguyendoanhkhoa@yahoo.com

Page 1

4. Check chn SDK cho project (chn android 2.2 ) / Next.

5. Application Name (tn project): Myproject1 PackageName (tn package, khi a ln Market khng c trng tn vi bt k chng trnh no khc) : com.android.myproject1 Activity: (Mc nh c to ra Activity no khng, tn g) : CongHaiSoActivity Minimum SDK: phin bn android thp nht chy (8 l android 2.2)

nguyendoanhkhoa@yahoo.com

Page 2

6. Tm hiu cu trc th mc Cha cc Activity Cha file R.java (t pht sinh) File ny cha cc tham chiu n giao din Cha file ci t .apk chp vo thit b Cha cc ti nguyn : Drawable-hdpi: ti nguyn cho mng hnh phn gii cao Drawable-ldpi: ti ngun cho mng hnh phn gii thp. Drawable-mdpi: ti nguyn cho mng hnh phn gii trung bnh Layout: cha file xml giao din activity Value: strings.xml khai bo cc nh x cho chui Ta c th to thm cc th mc cha ti nguyn trong th mc res. AnroidManifest.xml: cha cc cu hnh chung cho ton b project

7. Double click vo file main.xml ( thit k giao din). Ch vng bn di c 2 tab Graphical v main.xml cho php ta chuyn i qua li gia thit k giao din bng thao tc v bng lnh xml

nguyendoanhkhoa@yahoo.com

Page 3

8. Chy thit b o (nn chy thit b o trc khi chy project, chy project xong khng nn ng thit b o li, mi ln m li s rt lu) chn biu tng Open the android virtual device manager / chn thit b / Start (c th ng ca s Android Virtual device manager li nhng vn li thit b o)

nguyendoanhkhoa@yahoo.com

Page 4

9. Chy ng dng bng cch chn Run / Run hoc Ctrl+F11 hoc chn biu tng Run as trn thanh cng c. Ca s Run as hin ra, chn Anroid Application ri OK

nguyendoanhkhoa@yahoo.com

Page 5