第一堂 進入 android 的世界 --- jason 的 android 應用程式快樂學習班
TRANSCRIPT
第一堂:進入 Android 的世界
柯力中 Jason Ko
Jason的Android 快樂應用程式學習班
我是誰?
• 柯力中 Jason Ko, 奇芽科技Founder
• Appworks 第四屆入選團隊
• 4 年 Android APP 開發經驗, 下載破 300 萬
Jason的Android 快樂應用程式學習班
為何而來?
• 可以找到 APP 相關的工作嗎?
• 開發 APP 會賺錢嗎?
• 要學多久?
• and …?
Jason的Android 快樂應用程式學習班
相關工作104 人力銀行
Inside Job
66k 工作網
Jason的Android 快樂應用程式學習班
開發 APP 會賺錢嗎分享照片 APP Instagram, 2010 年10 月創
立, 2012 年 4 月 Facebook 以 10 億美元收
購
Jason的Android 快樂應用程式學習班
要學多久
• 你上英文課之前有問過老師要學多久嗎?
• 一萬小時定理
Jason的Android 快樂應用程式學習班
Android 的歷史
2003 年 10 月, 「Android之父」Andy Rubin 成立Android 公司.
Jason的Android 快樂應用程式學習班
Android 的歷史
Jason的Android 快樂應用程式學習班
2005 年, Google 買下 Android 公司. 大家期待會有 "gPhone" 出現.
2007 年, 開放手機聯盟 (Open) 成立, Android 成為開源碼.
2008 年, Android SDK 1.0 釋出,HTC 生產第一支 Android 手機G1
Android 的歷史
Jason的Android 快樂應用程式學習班
2011 年, 成為市佔率第一的智慧手機
Android 的歷史
Jason的Android 快樂應用程式學習班
2012 年, Google TV 釋出, Android 正式可支援各種螢幕2013 年, 推出 Google Glass
Google V.S Apple
Android開放 V.S iOS封閉11億 7000萬支 V.S 7500 萬支
62.69% 總網路流量 V.S 27.18% 總網路流量
41.2% 總廣告收益 V.S 51.67% 總廣告收益
2015 TechCrunch
Jason的Android 快樂應用程式學習班
NT$750 永久使用 V.S NT$3200 一年
任何電腦 V.S 蘋果電腦
Android 開發者 V.S iOS 開發者
2015 TheGuardian
US$30億 V.S US$100 億
Jason的Android 快樂應用程式學習班
未來? Big Change!
LTV: Life time value 每個 user ㄧ生可以貢獻的 $BusinessInsider 2015/1
Jason的Android 快樂應用程式學習班
Android 開發者做些什麼事?
Jason的Android 快樂應用程式學習班
Developer Story 1: Space Ape Games
Jason的Android 快樂應用程式學習班
https://www.youtube.com/watch?v=tCdvGgiX5cs
Developer Story 2: KiWi Inc.
Jason的Android 快樂應用程式學習班
https://www.youtube.com/watch?v=WWArLD6nqrk
Developer Story 3 : New York Times
Jason的Android 快樂應用程式學習班
https://www.youtube.com/watch?v=qpoxRwSNXXQ
Developer Story 4 : Trulia
Jason的Android 快樂應用程式學習班
https://www.youtube.com/watch?v=p2eZbZqo0es
Developer Story 5 : GinLemon
Jason的Android 快樂應用程式學習班
https://www.youtube.com/watch?v=700gYRkhkLM
• 1. 下載 Android Studio ( 以及 JDK )
• 2.下載 SDK API 22, Android 5.1.1
• 3. 下載 Intel x86 Emulator Accelerator (HAMX installer)
• 4. 建立模擬器 Nexus 5
• 5. 建立第一個程式
• 6. 跑第一個程式在模擬器上(or 手機)
我們現在要做
Jason的Android 快樂應用程式學習班
安裝開發環境: 下載 Android Studio
https://developer.android.com/sdk/index.html
Jason的Android 快樂應用程式學習班
1. 點擊安裝 Android Studio
2. 安裝好之後啟動, 會自動安裝最新的 SDK, SDK
API 22, Android 5.1.1 Lollipop
3. 此時也會下載 Intel x86 Emulator Accelerator
(HAMX installer) 的安裝檔
4. 接著, 我們要手動安裝 Intel x86 Emulator
Accelerator
設置 Android Studio
Jason的Android 快樂應用程式學習班
1. 找到 SDK 安裝的路徑
File => ProjectStructure => SDK Location
2. 沿著路徑找到 Intel x86 Emulator Accelerator
的安裝檔
3. 此時在點擊安裝, 就完成了!
設置 Android Studio —安裝 Intel x86
Emulator Accelerator
第一個 Android APP — HelloWorld
1. 選 Start a new Android Studio project
第一個 Android APP — HelloWorld2. 改 Application name => HelloWorld, 然後
next
第一個 Android APP — HelloWorld
3. 這裡選要開發的裝置與 SDK, 預設是
phone 及最新的 SDK, 直接 next
第一個 Android APP — HelloWorld
4. 這裡選要開發的 Activity 種類, 預設是
Blank Activity, 直接點 next
第一個 Android APP — HelloWorld5. 接著是Activity 的設定, 直接點 Finish, 專案就產生了
!
建立 Android 模擬器
1. 點擊控制列上的 AVD Manager (Android Virtual
Device Manager)
2. 點擊 create a virtual device
3. 選 phone, nexus 5, 接著點 next (如果電腦解析度較差,
可以選 nexus 4)4. 選 API 22, x86_64, Android 5.1.1, 再 next, finish 就完
成了
Jason的Android 快樂應用程式學習班
讓 Android 模擬器運行
1. 找到模擬器右方的運行按鈕, 點擊運行
模擬器運行畫面
將 Android Project 跑在模擬器上
1. 找到模擬器右方的運行按鈕, 點擊運行
Jason的Android 快樂應用程式學習班
2. 電腦會開始編譯檔案, 編譯完成會有 choose
device 的對話框, 選 Emulator Nexus 5, 點 OK
將 Android Project 跑在模擬器上
將 Android Project 跑在模擬器上
3. 滑開手機模擬器, 看到以下畫面就 OK 了. 完成第
一支 APP 並運行在模擬器上
將 Android Project 跑在手機上
1. 接著, 試著把程式跑在手機上, 此時需要開啟手機
的開發者模式以及手機 ADB, 請看下一頁!
Jason的Android 快樂應用程式學習班
手機 ADB(讓電腦連接Android手機)
1. 找到手機設定2. 點關於手機3. 手機版本號的地方, 連點 7 次 => 啟動開發者模式4. 此時再用 usb 線連接電腦跟手機, 就能在 Android
Studio 裡看到手機裝置了(這裡以小米3當範例)
開發環境介紹 Android Studio下載 SDK模擬器
Jason的Android 快樂應用程式學習班
認識 Android 的專案
• src.main.java => java 程式檔
• libs => libraries 引用程式檔
• res => 資源檔
• res / drawable => 圖片資源
• res / layout => 介面 layout 資源
• AndroidManifest.xml => APP 設定檔
• build.gradle => APP project 設定檔
• 1. 下載 Genymotion 安裝檔
• 2. 到官網申請 Genymotion 帳號
• 3. 安裝並新建一個模擬器
另一選擇:Genymotion模擬器
Jason的Android 快樂應用程式學習班
• 1. Windows 7 => 到我的電腦按右鍵, 看內容
• 2. Windows 8 => 在主面板往下拉, 看 pc info
32-bit or 64-bit
Jason的Android 快樂應用程式學習班
32-bit or 64-bit
Jason的Android 快樂應用程式學習班
參考
1. Android Developer Stories
http://developer.android.com/distribute/stori
es/index.html
Jason的Android 快樂應用程式學習班