1 / 115

Chapter 2

Chapter 2. Install Android Development Tools. Install Android Development Tools on Windows. Install Android Development Tools on Windows. Download SDK. Download Android SDK

sandra_john
Download Presentation

Chapter 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 2 Install Android Development Tools

  2. Install Android Development Tools on Windows

  3. Install Android Development Tools on Windows Download SDK • Download Android SDK • First, download Android SDK for Windows, the download site is as below:http://dl.google.com/android/android-sdk_r04-windows.zip 2.0

  4. Install Android Development Tools on Windows • Install Android SDK • 解壓縮後重新命名為”android-sdk”,SDK資料夾可放於任意位置,故本教材統一放於C槽底下

  5. Install Android Development Tools on Windows 選擇Eclipse Classic 3.5.0 下載後解壓縮即可執行 • Download Eclipse IDE • 下載Window版本Eclipse開發工具: • http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.5-200906111540/eclipse-SDK-3.5-win32.zip

  6. Install Android Development Tools on Windows Click Download • Download Java Development Kit (JDK) • Download site: • http://java.sun.com/javase/downloads/index.jsp

  7. Install Android Development Tools on Windows Platform Selection • Download Java Development Kit (JDK) • 選擇Windows平台,點選Download下載,接著會出現輸入帳號密碼視窗,將視窗關閉,下載將會自動開始。

  8. Install Android Development Tools on Windows • Install Android Development Tools (ADT) • Open Eclipse • Select Help  Install New Software…

  9. Install Android Development Tools on Windows Click “Add” Button Install Android Development Tools (ADT)

  10. Install Android Development Tools on Windows http://dl-ssl.google.com/android/eclipse/site.xml 將網址至於Location欄位,Name欄位可自行命名 Install Android Development Tools (ADT)

  11. Install Android Development Tools on Windows 勾選Developer Tools(Android DDMS and ADT) 點選”下一步” Install Android Development Tools (ADT)

  12. Install Android Development Tools on Windows 列出準備安裝的Package詳細內容,此處直接點選”下一步”即可 Install Android Development Tools (ADT)

  13. Install Android Development Tools on Windows Finally, Click “Finish” Install Android Development Tools (ADT)

  14. Install Android Development Tools on Windows Restart Eclipse After Installation Install Android Development Tools (ADT)

  15. Install Android Development Tools on Windows 點選 Window  Preferences進行Android SDK細項設定 設定Android SDK細項

  16. Install Android Development Tools on Windows 點選 “Browse…”並選擇Android SDK存放位置 設定Android SDK細項

  17. Install Android Development Tools on Windows 設定完成後選擇”OK”完成設定(其他選項可根據需求作修改) 設定Android SDK細項

  18. Install Android Development Tools on Windows 設定Android SDK細項

  19. Install Android Development Tools on Windows 選擇Installed Packages,並點選Update All… Install Android-SDK

  20. Install Android Development Tools on Windows 點選Accept All,接著按下Install Accepted Install Android-SDK

  21. Install Android Development Tools on Windows 系統會詢問是否重新啟動ADB,點選”是”重新啟動 Install Android-SDK

  22. Install Android Development Tools on Windows 安裝完成後點選Close即完成安裝 Install Android-SDK

  23. Install Android Development Tools on Windows First Click “Help” and choose “Install New Software…” Eclipse中文化

  24. Install Android Development Tools on Windows 點選Add…按鈕新增設定 Eclipse中文化

  25. Install Android Development Tools on Windows Name欄位輸入任意名稱,Location欄位中輸入http://download.eclipse.org/technology/babel/update-site/galileo後點選OK Eclipse中文化

  26. Install Android Development Tools on Windows 由網路取得語言套件列表 Eclipse中文化

  27. Install Android Development Tools on Windows 勾選Bebel Language Packs in Chinese (Traditional),並點選Next。 Eclipse中文化

  28. Install Android Development Tools on Windows 並點選Next即可開始安裝。 Eclipse中文化

  29. Install Android Development Tools on Windows 勾選同意license,並點選Finish Eclipse中文化

  30. Install Android Development Tools on Windows 安裝完成後,點選”Yes”重新開機 Eclipse中文化

  31. Android Hello World!

  32. Android Hello World! • 自動補齊函式名稱 • Alt+/

  33. Android Hello World! • 將程式碼變成註解 • Ctrl + /

  34. Android Hello World! • 自動import類別 • Ctrl + Shift + o

  35. Android Hello World! • 函式或變數自動更正 • Ctrl + 1

  36. Android Hello World! • Set Breakpoint • 在欲設置中斷點處點選滑鼠左鍵

  37. Android Hello World! How to Open Debugger Window

  38. Android Hello World! How to Open Debugger Window

  39. Android Hello World! Main Window of Debugger Window

  40. Introduction on Android SDK

  41. Introduction on Android SDK • Android Emulator • 可在一般電腦環境下運行擁有Andorid環境的模擬器,用於開發、測試、設計Android的應用程式 • Android Debug Bridge • 一般簡稱adb,adb工具可讓使用者在模擬器或設備上安裝.apk檔案 • Android Asset Packaging Tool • 簡稱Aapt,可以建立包含Android應用程式二進位文件和資源文件.apk文件。

  42. Introduction on Android SDK • Hierarchy Viewer • 用於除錯和最佳化使用者界面 • Dalvik Debug Monitor Service • 在模擬器或設備上管理Processes以及加快除錯速度。 • Traceview • 產生trace log date的圖形分析

  43. Introduction on Android SDK • Android Development Tools Plugin for the Eclipse IDE • 簡稱ADT,使用於Eclipse IDE上。ADT套件可以加快開發Android應用程式,且可以從Eclipse IDE直接使用其它Android開發工具。 • 提供了一個新的專案精靈(New Project Wizard),快速建立起新的Android應用程式所需的文件。

  44. Introduction on Android SDK

  45. Introduction on Android SDK • Android SDK is consisted of several parts shown below: • Android Emulator • Android Debug Bridge (adb) • Hierarchy Viewer • Android Development Tools Plugin for the Eclipse IDE • Dalvik Debug Monitor Service (ddms) • Android Asset Packaging Tool (aapt) • Android Interface Description Language (aidl) • sqlite3 • traceview • mksdcard • Dx • UI/Application Exerciser Monkey • activitycreator

  46. Introduction on Android SDK • Android Emulator • Android Debug Bridge • Android Asset Packaging Tool • Hierarchy Viewer • Dalvik Debug Monitor Service • Traceview

  47. Start Android Emulator • Steps to Starting Android Emulator: • 使用命令提示字元 • 使用Eclipse IDE • 使用AVD管理員

  48. Android Emulator • 列出可用Android模擬器 android list target • 建立Android模擬器 android create avd --name 模擬器名稱 --target 模擬平台id (參數可由第一個指令得知) • Emulator 命令列啟動參數 emulator -avd 欲啟動模擬設備之名稱 其他參數: -timezone 時區(e.x. Asia/Taipei) -no-boot-anim (略過開機畫面) -scale auto (自動調整模擬器視窗大小) -scale 數字(範圍: 0.1-3.0,改變模擬器視窗大小)

  49. Android Emulator Emulator 命令列啟動參數 -dpi-device 數字(更改模擬器解析度,預設為165dpi) -skin <skinID> (更改模擬器外觀) -help-keys (顯示鍵盤快速鍵說明) -shell (相當於adb shell功能) -data filename (使用/data目錄存取data.img的檔案空間) -sdcard filename(使用/sdcard目錄存取sdcard.img的檔案空間) -cache filename(瀏覽器暫存檔案) -wipe-data (還原至原廠設定) -help (顯示emulator其他參數)

  50. Android Emulator 列出可用Android targets

More Related