Objective: Let students know how to build an Android application using sdk provided by Google



Download 10.67 Kb.
Date17.06.2017
Size10.67 Kb.
#20969
LAB 2

Building your Android APK


Objective: Let students know how to build an Android application using SDK provided by Google
Lab material: Tablet(TF9300) x 1

USB cable(Type-A male to mini-USB male)

PC with Windows OS

Students or TAs might need prepare the USB cable by themselves. And please notify students to fully charge the tablet before LAB started.
Lesson 1: Install Android Studio and JDK


  1. http://developer.android.com/sdk/index.html

  2. Click “Download Android Studio for Windows” button

  3. Check “I have read and agree with the above terms and conditions”

  4. Click “Download Android Studio for Windows” button

  5. Execute the file “android-studio-bundle-141.1890965-windows.exe”

  6. While installing the Android Studio, if the JDK can’t be detect during install process, install JDK 7 as well.


Lesson 1 might take long time and will have lots of troubles for students. Suggest that TA help to finish this lesson before the LAB
Lesson 2: Install the necessary platform and sample codes

  1. Start the “Android Studio” application.

  2. In the “Select UI Theme” screen, click “Next” button and wait for the update process to finish

  3. In the “Welcome to Android Studio” screen, select “Configure”, then select “SDK Manager”

  4. Unchecked all 5 items under Android 5.1.1(API 22). Checked “SDK Platform” and “Samples for SDK” 2 items under Android 4.3.1(API 18). Please see Fig.1

Fig. 1



  1. Click “Install 4 packages”

  2. Select “Accept License”, then click “Install” button and wait for install process to finish

  3. Close the Android SDK Manager and go back to “Welcome to Android Studio” screen

  4. Click “<=” icon to go back to “Quick Start” menu

Lesson 3: Connect PC to tablet



  1. Start the tablet, Click Application -> Settings -> About tablet

  2. Click “Build number” a couple of times until a message pops out and says that “You are now a developer”

  3. Go to Settings -> Developer options, check USB debugging.

  4. Connect PC to tablet using USB cable, you should be able to see an “Jelly Bean” icon pops out in the upper notification bar.

Lesson 4: Run API demos APK on tablet



  1. In the “Welcome to Android Studio” screen, select “Open an existing Android Studio project”

  2. Choose the path C:\Users\\AppData\Local\Android\sdk\samples\android-18\legacy\ApiDemos

  3. Select “Run -> Run”, then click “Edit Configurations”

  4. Select “Default -> Android Application”, check “USB device”, then click “Run” button. You should be able to see the “API demos” APK run on the tablet.

Install Android studio step



JDK install -> android studio

Download Java SE Development Kit(JDK) 7






安裝完後可以自動偵測JDK的位子,只要循序安裝即可



要注意是否使用的JDK是1.7.0_80

不是的話請到163.25.101.192下載3

並且設定環境變數為jdk1.7.0_80





.

可以接下去上面老師所說的操作








Download 10.67 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page