Introduction: How to Setup Eclipse for Android App Development

Picture of How to Setup Eclipse for Android App Development

Developing Android applications can be a fun and exciting experience. To get started creating Android applications, you need a proper development environment. This will allow you to use all the tools needed to create an app and ensure you work efficiently. I will show you how to setup a working environment using the Android SDK, Eclipse IDE, and ADT Plugin.

This Instructable assumes you have knowledge of what Android is and have a basic understanding of programming, although programming is not required.

First I will explain how to get and setup the Android SDK provided by Google. Then I will address the use of the Eclipse IDE for development. Finally, I will focus on the ADT (Android Development Tool) Plugin that integrates the Android SDK with Eclipse.

Approximate time required: 20 mins.

Requirements: Computer with 300 mb of free space.

Step 1: Obtain the Android SDK

Picture of Obtain the Android SDK
  • We need to obtain the Android Software Development Kit. To do that we must first visit the SDK download site below.
  • http://developer.android.com/sdk/index.html
  • Scroll to the bottom of the webpage and select the 'Download the SDK Tools' button.
  • This will open a file to be saved somewhere.

Step 2: Install the Android SDK

Picture of Install the Android SDK
  • Open the file we just downloaded.
  • This will open an executable which will ask you about the installation process.
  • When you get to the install location screen, make sure you choose a location you remember (we will need it later).

Step 3: Open Android SDK Manager

Picture of Open Android SDK Manager

We'll select the most recent version along with the extra SDK tools so you can build applications for any Android version.

  • Open the folder that we installed the SDK into.
  • You'll see a executable called 'SDK Manager'. Open it.
  • You'll see a window where you can select different versions of Android to develop for.

Step 4: Install Android Version and Extras for SDK

Picture of Install Android Version and Extras for SDK
  • Select the 'Tools' and 'Android 4.4.2 (API 19)' check boxes.
  • If you would like to have extra Android tools you can choose them from the 'Extras' selection.
  • You will then be prompted to accept the Android conditions and then the SDK will install. Then installation may take a while depending on your internet connection. The Android SDK is now completely installed.

Step 5: Obtain Eclipse IDE

Picture of Obtain Eclipse IDE

Eclipse is the tool we'll be using to develop in. It is the most popular Android development environment and has officially supported tools from Google.

Step 6: Run Eclipse for First Time

Picture of Run Eclipse for First Time

Eclipse does not require installation. It's a folder with all the necessary files and settings. You can run it directly from the Eclipse folder. It's recommended you put it in a safe place with other applications.

  • Extract the downloaded Eclipse file into a safe place where you can keep the program.
  • Open the extracted folder and open the 'eclipse' executable.

You should see a screen similar to the one attached if all went well.

Step 7: Add ADT Plugin Repository

Picture of Add ADT Plugin Repository

The ADT (Android Development Tool) Plugin was made specifically for Eclipse to increase productivity and integration with your Android work environment. To use it, we first add the Eclipse plugin repository so it knows where to find it along with updates.

  • In the Eclipse application menu, go to 'Help' and then 'Install New Software'.
  • Click on the 'Add...' button and you'll see a window appear.
  • Give the repository a name like 'ADT Repo'.
  • Give it the location http://dl-ssl.google.com/android/eclipse/.
  • Click 'OK' button.

Step 8: Install ADT Plugin

Picture of Install ADT Plugin

Now that we have the plugin repo setup we need to install the plugin from it.

  • On the 'Install Software' screen, select the repo you just created from the 'Work with' selector.
  • Select the 'Developer Tools' option from the listed below options.
  • Click 'Next' and accept the agreements.
  • Click 'Finish' and let it install. It might take a while depending on your internet speed.

Step 9: Access ADT Plugin Preferences

Picture of Access ADT Plugin Preferences

You'll most likely have to restart Eclipse after you install the ADT Plugin so do that before you continue.

  • Mac/Linux: After Eclipse has restarted, click 'Eclipse' in the application menu.
  • Windows: After Eclipse has restarted, click 'Window' in the application menu.
  • Then select 'Preferences'.
  • In the Preferences window, select the Android tab on the left side and it's corresponding drop down menu.

This is the ADT Preferences screen. It will allow you to change setting, remove the SDK and make editor preferences for your development.

Step 10: Setup ADT Plugin

Picture of Setup ADT Plugin
  • Click 'Browse' on the right side of the screen.
  • Search for the folder in which you installed the Android SDK into and select it.
  • Hit the 'Apply' button on the Preferences screen.
  • You should see the Android version you installed early to show up if all went well.
  • If not, try reselecting the folder. (Make sure the folder contains the folders 'build-tools','platform','extras' and etc.
  • Hit the 'OK' button and restart Eclipse.

Step 11: Access ADT Android Virtual Device Manager

Picture of Access ADT Android Virtual Device Manager

To test your application we need to add an Android Virtual Device if you don't have a personal device.

In the application menu, select 'Window' and then 'Android Virtual Device Manager'

Here you can create new 'Devices'.

Step 12: Add ADT Virtual Device

  • Click the 'New...' button on the right side.
  • Give your device a name in 'AVD Name'.
  • You want to check mark 'Use Host GPU'
  • The other options are up to you and can be played with to figure out what works best.
  • When done, hit 'OK'.

Step 13: Conclusion

You have now setup an environment ready to develop Android applications. We installed the Android SDK, Eclipse, and the ADT Plugin.

To create your first application, visit https://developer.android.com/training/basics/firs...

Comments

AmirR46 (author)2017-04-14

Thanks for the great tutorial I made it

Kayplause (author)2017-03-01

Pls someone should please help me, as i am stuck at step 10. My OK button is always inactive irrespective of the selected folder.

Muhammad TayyabS (author)2016-12-20

The link you have provided for the download of Android SDK redirects
to android studio download page
. So here is the direct link to download
the Android SDK installer for windows and its working perfectly fine:

http://dl.google.com/android/installer_r08-windows.exe

geeameal (author)2016-11-01

when i install the adt plug in it says "Cannot complete the install because of a conflicting dependency.

Software being installed: Android Development Tools 23.0.7.2120684 (com.android.ide.eclipse.adt.feature.feature.group"

The IndianC (author)2016-10-23

Thanks!

ShreedharH (author)2016-09-16

Simple and very helpful. Than you..

LeoL60 (author)2016-08-06

Only problem it is is no where near 300MB. Closer to 3GB, and I only installed the packages for the current Android version.

LeoL60 (author)LeoL602016-08-06

Update: 3GB without even having all of the necessary packages. I only went with this tutorial because of it's claim to only need 300MB (I have very limited storage space). Yet, the overall size is over 5GB. I simply don't have that space on my computer.

DvS2 (author)2016-07-18

Thanks, nice very helpful. :)

FakharuddinC (author)2016-07-10

Its very helpful, no doubt

macyjones (author)2016-05-27

Thanks for sharing Nice post and very helpfull

macyjones (author)2016-05-27

Thanks for sharing Nice post and very helpfull

steffan_marco (author)2016-05-23

This is very
informative post and i am waiting for this kinds of post. Thanks for providing such important information about an android app developers which is very useful for me. Thanks for providing such a good information.

allen8 (author)2016-04-28

Hi, Just follow the steps in given link to setup eclipse. http://www.trainingchennai.com/how-to-install-android-sdk-in-eclipse.html

DustinN3 (author)2016-03-10

hi, i followed all the steps but this seems to be popping up :/

AbdillahP (author)DustinN32016-03-17

Maybe you have to check your system, x86 or x64 then change your eclipse.

That's help me out sir :)

epicmike (author)2016-03-01

I followed every step twice. The first time I followed the steps and got an error.

[2016-03-01 15:28:42 - SDK Manager] Error: Error reading default devices

[2016-03-01 15:28:43 - SDK Manager] Error: null

[2016-03-01 15:28:43 - SDK Manager] Error: null

[2016-03-01 15:28:43 - SDK Manager] Error: null

I read through some of the comments and tried to uninstall everything and install it again. Now im getting the same error message. Please help.

JianA1 (author)2016-01-13

HEEELLLP :'(

I cant install the developer tools
'An error occurred while collecting items to be installed'

itsmarkkessler (author)2016-01-11

Setting up the eclipse for Android app development is challenging for newbie who are looking to build their first Android apps. I hope this tutorial helps them in an easy way..

custom Android app development

Eng_usman_riaz (author)2016-01-02

I have download a udemy course free about android development and very impressive and learn lot. This is step by step Android Development tutorials & contain 95 videos and amazing way of teaching. Download Free course at here:

Android Development tutorials

Eng_usman_riaz (author)2016-01-02

I have download a udemy course free about android development and very impressive and learn lot. This is step by step Android Development tutorials & contain 95 videos and amazing way of teaching. Download Free course at here:

Android Development tutorials

Eng_usman_riaz (author)2016-01-02

I have download a udemy course free about android development and very impressive and learn lot. This is step by step tutorials & contain 95 videos and amazing way of teaching. Download Free course at here:

http://www.come4learn.com/android-apps-development-video-tutorials-in-urdu/

Eng_usman_riaz (author)2016-01-02

I have download a udemy course free about android development and very impressive and learn lot. This is step by step tutorials & contain 95 videos and amazing way of teaching. Download Free course at here:

http://www.come4learn.com/android-apps-development-video-tutorials-in-urdu/

KarthickR9 (author)2015-10-22

i am in the step10 i couldn't find the sdk where it installed, please help me

AhmdR (author)KarthickR92015-11-09

if you selected "only for me" in installation, then sdk is in user>(your_username)>appdata>local>android
and if you selected "for everyone" then it is in program files

RogitoD (author)2015-10-28

What's with the "Gradle sync failed" error. Could someone help me resolve this in android studio?

PiyushP16 (author)2015-10-27

thanks man helps a lot :)

rkavil (author)2015-10-18

thanks man.Very useful.

tejask7 (author)2015-10-01

For all those who are facing issue with the OK button, try renaming you AVD. I tried to name mine 'MyPhone' and the OK button got disabled, I then renamed it to 'MyPhon' and the OK button was enabled, don't understand why the 'e' is causing an issue, anyway try this solution :)

Fadwa HopefulHopesM (author)2015-09-15

thnx, very useful link :)

Kindly help,

in step 12: when following the steps as described and no matter what other options I add, the "Ok" button is always inactive. ...

NikolasP1 (author)2014-09-10

I cant click ok

me too :(

Fadwa HopefulHopesM (author)2015-09-15

thank u, very useful link :)

Kindly help,

in step 12: when following the steps as described and no matter what other options I add, the "Ok" button is always inactive. ...

thedevilyoudont (author)2015-08-12

Great Instructable my friend. Though just wanted to let you know the period at the end of your last link seems to misdirect to an Error 404 page. Have a great one and keep up the good work!

LiamO1 (author)2014-11-10

I cannot run the SDK manager. When I try a command window opens but then closes right after. Is there any way to fix this?

AhmadZ3 (author)LiamO12015-07-12

Right click > Run As Administrator, or you might want to check UAC. If it does not help, try clean install.

MichaelN21 (author)2015-06-20

Hello there. In step 12 I am facing at least 2 problems:

Problem 1: as described, there is no button called "New", but instead there is a button called "Create"

Problem 2: when following the steps as described and if I do not perform additional steps the "Ok" button is inactive. therefore I had to add other options until the "Ok" button was active. And this is what I added: Device: Galaxy Nexus; CPU/ABI: Intel Atom (x86); Skin: No skin, then pressed "Ok"

Problem 3: after creating the device an error message comes up see attached image.

One more thing, I am using a Windows 8.1 VirtualBox Virtual machine on 1 Windows 8.1 host.

I would greatly appreciate help to fix the problem.

Thank you.

GautamS4 (author)MichaelN212015-07-03

Hey. How did you solve your problem 3?

MichaelN21 (author)GautamS42015-07-03

Hello GautamS4:
I used Google to look for the text that was in the error message.

and here is one of the links that was provided as an answer for this problem:
http://stackoverflow.com/questions/18402913/error-parsing-c-documents-and-settings-user-android-devices-xml

Good luck and have a great weekend.

GautamS4 (author)MichaelN212015-07-04

Hello Michael.

I hope I will be done with that problem. I would also like to know it from you, how much space does your 'Android' folder eats up of your C drive? And does that 'Android' folder has 'System Images' folder in it?

MichaelN21 (author)GautamS42015-07-04

Hello MichaelN21,

The Android folder is consuming 435 MB on C Drive and over 5GB on external drive, that including Eclipse, Android Studio, projects, notes and tutorials. Also additional 7 GB Android related installations on drive C. I do not have a folder called "System Images".

I hope this helped.

Regards

GautamS4 (author)2015-07-03

I was in step 4. I checked in with Android 5.1.1 and it asked to install 31 packages. When I tried installing it, it consumed 3 GB internet data. Now the android folder in C drive takes up 21 GB. Kindly help

MichaelN21 (author)2015-06-19

Hello There. Thank you for the very nice tutorial. A small minor type is found at the end of the tutorial under step 13, which is the hidden link contains a "." dot/period at the end, which causes a wrong page. if you take the "." out, then it will be ok.
Have a great summer 2015, and in case we don't see each other, then have also a great year 2016, 17......

daz_aryan (author)2015-06-02

You nicely explained this. But I found one mistake, change the ADT repo URL to

https://dl-ssl.google.com/android/eclipse/

sroi (author)2015-05-02

thq .. made my work easier

dev_patel125 (author)2015-04-23

Really Informative & Helpful post for Biggner....

harsha_empire (author)2015-03-02

Great Tutorial!!

Thanks for sharing!!!