Jumat, 19 September 2014

How To Install Android SDK

I began to learn and practice android programming about some month ago, but just recently began serious. lol.
I think Android have a bright future so it is worth it to learn this platform and try to make software in it. You can easily sell your android software on Play Store too, don't you?. :)  

1.  Introduction

Android is an Operating System for mobile devices developed by Google, which is built upon Linux kernel. Android competes with Apple's iOS (for iPhone/iPad), RIM's Blackberry, Microsoft's Windows Phone (previously called Windows Mobile), Sambian OS, and many other proprietary mobile OSes.

Android Platform

Android is based on Linux with a set of native core C/C++ libraries. Android applications are written in Java. However, they run on Android's own Java Virtual Machine, called Dalvik Virtual Machine (DVM) (instead of JDK's JVM) which is optimized to operate on the mobile devices.
The mother site for Android is http://www.android.com. For developers, visit http://developer.android.com to download the SDK, Android Training, API Guides and API documentation.


Don't get it? don't mind, I don't really got it too. lol. People say if you always practice it and working with it then you can understand it by yourself later. As long as you are understand about basic foundation then you can proceed to the next step.

Android Platform have many version depending to their release date. They always choose cake name as their code name version, don't ask me why they are choose that.


2.  How to Install Android Software Development Kit (SDK)

Installing all the necessary software needed for Android programming takes times - from 15 minutes to 3 hours - depending on your luck!!!
Android Software Development Kit (SDK) runs on top of Eclipse with Android Development Tool (ADT) Plugin; and JDK. In other words, you need
  1. JDK,
  2. Eclipse,
  3. ADT Plugin for Eclipse, and
  4. Android SDK.
Pre-Installation Check List
  1. Before installing Android SDK, you need to install Java Development Kit (JDK). Read "How to install JDK".
  2. Read the "Android Training" @ Android Developers (http://developer.android.com). There are three main menus: "Design", "Develop", and "Distribute". Choose "Develop", you can find the Android "Training", "API Guides", "Reference" and "Tools". For beginners, browse through the "Training".
Android SDK Installation Packages
There are two options to install Android SDK:
  1. Install the "ADT Bundle", which includes everything you need to write Android apps (i.e., Eclipse + ADT Plugin for Eclipse + Android SDK). This requires a huge download of about 500MB. [However, the Bundle's SDK version is slightly behind. At the time of writing (end of March 2014), Bundle is 22.3, but SDK is 22.6.]
  2. If you have already installed Eclipse, you could install the ADT plugin for Eclipse and Android SDK on top of the existing Eclipse.

2.1  Installation Option (1): Installing ADT Bundle (Recommended)

Step 1: Download the "ADT Bundle" Zip File
Goto "Android Developer" @ http://developer.android.com/index.html and select "Get the SDK".
  • For Windows: Select "Download the SDK - ADT Bundle for Windows". Choose either "32-bit" or "64-bit" and "Download".
  • For Mac: Expand "Download for Other Platforms" ⇒ Under "ADT Bundle", Select "Mac OS X 64-bit".
Step 2: Unzip
Unzip the download file into a folder of your choice, e.g., "d:\myproject" (for Windows) or "/Applications" (for Mac). Do NOT use a directory name containing space or special characters!!!

2.2  Installation Option (2): Installing on Existing Eclipse (Skip if you choose option 1)

Step 0: Check that Eclipse has been installed
Step 1: Download the Android SDK
Goto http://developer.android.com/sdk/index.html. ⇒ Expand "Download For Other Platforms" ⇒ Under "SDK Tools Only" ⇒ Download the appropriate SDK Tools for your operating platform. Choose the ZIP version, e.g., android-sdk_r22.6-windows.zip (104 MB).
Step 2: Install Android SDK
Unzip the downloaded file into a folder of your choice. Take note of the installed directory. Hereafter, I shall denote the android installed directory as <ANDROID_SDK_HOME>.
Step 3: Install Android Platforms and Add-ons via "SDK Manager"
The Android SDK comprises 2 parts: the "tools" and the "Platforms & Add-ons". The previous step installed the basic "tools", which are executables that support app development. The "Platforms & Add-ons" consist of ALL Android platforms (from Android 1.x to 4.x) and various Google Add-ons (such as Google Map API), which could be selectively installed.
Now, we have to setup our Android "Platforms & Add-ons".
  1. Launch Android's "SDK Manager", which is responsible for managing the Android components. Launch the SDK manager by running (double-clicking) "SDK Manager.exe" under the Android installed directory.
  2. In "Add Platforms and Packages", select your target Android platforms and add-ons packages. For novices, select "Android SDK Platform-Tools", and at least one (the latest) Android platform (e.g., Android 4.4 (API 19)) ⇒ "Install".
Step 4: Install Eclipse Android Development Tool (ADT) Plugin
I suppose that you have installed Eclipse.
  1. Launch Eclipse.
  2. Install Eclipse ADT: From Eclipse's "Help" menu ⇒ "Install New Software..." ⇒ In "Work with", enter https://dl-ssl.google.com/android/eclipse/ ⇒ Check ALL boxes ⇒ Next ⇒ Finish ⇒ Restart Eclipse to use ADT plugin.
  3. Configure Eclipse ADT: From Eclipse's "Window" menu ⇒ Preferences ⇒ Android ⇒ In "SDK Location", select the Android SDK installed directory (that you have chosen in Step 2).
(Optional) Step 5: Setup PATH for utilities adb.exe and emulator.exe
To run the utilities "adb.exe" (Android Debug Brige) and "emulator.exe" from command-line, you need to include their path in the environment variable PATH. The "adb.exe" is kept in directory "<ANDROID_SDK_HOME>\platform-tools", while "emulator.exe" is kept in "<ANDROID_SDK_HOME>\tools". Add both directories to the PATH.
For Windows: Start "Control Panel" ⇒ "System" ⇒ (Vista/7) "Advanced system settings" ⇒ Switch to "Advanced" tab ⇒ "Environment variables" ⇒ Choose "System Variables" for all users (or "User Variables" for this login user only) ⇒ Select variable "PATH" ⇒ Choose "Edit" for modifying an existing variable ⇒ In variable "Value", APPEND your <ANDROID_SDK_HOME>\platform-tools directory (e.g., "d:\bin\android-sdk\tools"), followed by a semi-colon ';', IN FRONT of all the existing path entries. DO NOT remove any existing entry; otherwise, some programs may not run.
Add the "<ANDROID_SDK_HOME>\tools" directory to the PATH too.

0 komentar:

Posting Komentar