huong_dan_lap_trinh_voi_android_1

Upload: nguyen-kien

Post on 08-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 huong_dan_lap_trinh_voi_android_1

    1/5

    Bi ny s hng dn cn k mi ngi cch s dng Android trong Eclipse, hivng gip nhng ngi mi chp chng bc vo lp trnh Android c thm thngtin v bit cch khai thc IDE ca mnh hiu qu hn.

    I.Hng dn ci t Android vi Eclipse:Thc cht anh Gip vit mt bi c ni dung tng t, nhng do Goolge thayi phng thc ti Android SDK nn mnh quyt nh vit li, gp lun vo topichng dn s dng Eclipse.

    1.Download Android SDK:

    Android SDK thc cht l tp hp cc cng c v th vin pht trin cc ngdng trn nn tng h iu hnh Android.

    B1:Vo tranghttp://developer.android.com/sdk/index.html ti Android SDKStarter. Ty thuc vo h iu hnh m bn chn bn Mac, Linux hay Window. y mnh chn ti bn cho Window.

    B2:Gii nn file zip bn va ti v. Chy SDK Setup.exe. Bn c th gp thngbo li Fetchinghttps://dl-sl... Failed to fetch... Close thng bo ny li. Tip theoca s Choose Packages to Install xut hin. Nu ca s ny trng rng -> Cancel.-> Quay v ca s Android SDK and AVD manager-> Chn Setting, nh duvo Forcehttps://...-> Chn Available Packages

    http://developer.android.com/sdk/index.htmlhttp://developer.android.com/sdk/index.htmlhttp://developer.android.com/sdk/index.htmlhttps://dl-sl/https://dl-sl/https://dl-sl/https://./https://./https://./https://./https://dl-sl/http://developer.android.com/sdk/index.html
  • 8/7/2019 huong_dan_lap_trinh_voi_android_1

    2/5

    B3:nh du cc Packages bn mun ti: Documents chnh l phn Javadoc m thot ng ca cc phng thc v cc lp (phn ny chc chn khng th thiuri), Sample l cc on codemu, SDK Platform ng vi cc phin bn h iuhnh (2.2 - API level 8, 2.1 - API level 7,...), v Google API pht trin cc phnmm lin quan n dch v ca Google (nh Google Map nu bn mun lp trnhlin quan n GPS).

    Cc bn c th ti ht nu thch, cn mun ti u th c th nh du nh mnh(lu USB drivers ch dnh cho ngi s dng Windows v mun pht trin ngdng test bng in thoi tht).-> Install Selected

    -> Install

    -> Ca s Install hin ra-> Ngi ch (>_

  • 8/7/2019 huong_dan_lap_trinh_voi_android_1

    3/5

    2.Tch hp Android SDK vo Eclipse:

    B1:Ti Eclipse nu bn cha c. Mi ngi c th phn vn khng bit ti bnno cho ph hp, nhng theo kin ca mnh th c th dng 1 trong 2 bn sau:Eclipse for Java Developers, hoc Eclipse for Java and Report Developers (mnhdng bn sau).

    B2:Khi chy Eclipse, vo Help -> Install new softwares.Chn Add, g vo Name tn bn mun v Location g vo a ch ti vADT:

    HTML Code:

    https://dl-ssl.google.com/android/eclipse/

    hocHTML Code:

    http://dl-ssl.google.com/android/eclipse/

  • 8/7/2019 huong_dan_lap_trinh_voi_android_1

    4/5

    nu https khng hot ng. Ngoi ra bn cng c th ti thng ADT v my theolinkhttp://dl.google.com/android/ADT-0.9.7.zip(bn mi nht 0.9.7 ng viAndroid 2.2), chn Archive v browse ti file ny (lu khng gii nn)-> OK

    -> Check vo phn di Name (s hin ra dng Developer Tools).

    B3:Next, next, Accept, next,...Finish (nh Install mi chng trnh bnh thng).

    http://dl.google.com/android/ADT-0.9.7.ziphttp://dl.google.com/android/ADT-0.9.7.ziphttp://dl.google.com/android/ADT-0.9.7.ziphttp://dl.google.com/android/ADT-0.9.7.zip
  • 8/7/2019 huong_dan_lap_trinh_voi_android_1

    5/5

    B4: Eclipse -> Windows -> Preferences -> Android

    Nhn nt Browse v chnh ng dn ti th mc ca Android SDK bn ti lctrc.-> Apply

    -> OK