The beauty of Android development is that you are not restricted to any particular development environment. You can use any operating systems and any IDE you like. But since we will be writing Java code, Eclipse is a natural choice.
All you need are these 4 things
- Java SDK 6
- Eclipse IDE
- Android SDK
- Eclipse ADT plugin
- git (optional but recommended)
Get Java SDK
If you don't have Java SDK, getting it is simple. Download it from
http://www.java.com/getjava
Download Eclipse IDE
Download Eclipse Classic from
http://www.eclipse.org/downloads/
If you are using Mac or Linux, and not sure if you are running 64bit or 32bit machine, inside Terminal run this command
$ uname -a
The output will tell you which eclipse binary you should download. Unzip and you have Eclipse.
Download Android SDK & Tools
Next step is to download Android SDK from
https://developer.android.com/sdk/index.html
Unzip the file you just downloaded. You should see
android-sdk-mac folder. Copy it to a location where you want to download all other Android Development tools. Using terminal, navigate to
tools folder inside
android-sdk-mac and run android program
~/dev/android-dev/android-sdk-macosx/tools $ ./android
This opens up Android SDK Manager. It shows you all installed components, the updates and also lists all available versions of Android SDK. This is where you will select what you need to download that includes, plain SDK, sample code, SDK source code, system images, Google APIs and also vendor specific components. If that's too much to take in, make sure you select for both Android 4.1 and Android 4.0.3
- Documentation from Android SDK
- SDK platform
- Samples for SDK
- ARM EABI system image
And under Tools category, select
- Android SDK Tools
- Android SDK platform-tools
And click install packages, next Accept all and let it finish.
The final step is to install Eclipse ADT plugin which makes Android development tools (mode on that later) part of the IDE for easy access.
Download the ADT Plugin
- Start Eclipse, then select Help > Install New Software.
- Click Add, in the top-right corner.
- In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
https://dl-ssl.google.com/android/eclipse/
- Click OK.
If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
- In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
- In the next window, you'll see a list of the tools to be downloaded. Click Next.
- Read and accept the license agreements, then click Finish.
If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
- When the installation completes, restart Eclipse.
After you've installed ADT and restarted Eclipse, you must specify the location of your Android SDK directory:
- Select Window > Preferences... to open the Preferences panel (on Mac OS X, select Eclipse > Preferences).
- Select Android from the left panel.
You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and clickProceed.
- For the SDK Location in the main panel, click Browse... and locate your downloaded Android SDK directory (such as
android-sdk-windows
).
- Click Apply, then OK.
Git is an open source version control system. It works best for small projects as well as massive projects like Android platform itself. It will help you maintain different versions of your source code. In case you would like to download the Android source code, you will require git. It's very easy install.
Download it from below site and install it using package manager.
http://git-scm.com/
We will talk s more about git once we start developing actual applications.
Next, we will talk about some Android Development Tools and will run our first Android app.