Setting the Environment: Using Eclipse and Netbeans for Developing Google Android Apps

Written by:  • Edited by: Simon Hill
Updated Jul 5, 2011
• Related Guides: Android | Android Applications

In this first part of the series of articles, we will set the environment to start developing own Android applications using Eclipse or Netbeans.

The Google Android platform, offers us a easy and quick way to develop applications for mobile devices. The Google Android web page contains lots of useful information about Android architecture, libraries and source codes. First of all, let's start with the tools we will need to start developing our own Android applications. This page will be our reference page to get all the stuff we need:

http://code.google.com/intl/en/android/

We have some tools we can choose to work with for developing Android apps, we can use Eclipse or Netbeans. Both of them are free good IDEs to work with, but we are going to use Eclipse, because its plug-in for Android is more mature than the Netbeans one.

Android SDK

We will need another tool to work with Android. This tool is called the SDK (Software Development Kit), once we have downloaded it and placed it somewhere on the computer (C:/Android/SDK if we are in Windows, for example, or ./home/jbeer/Android/SDK if we use a *nix system). We have to remember where we have placed the SDK, in the next steps we will have to enter the path in the Eclipse/Netbeans environment.

Eclipse

Once we have placed the SDK we will need the Android plug-in for Eclipse. Depending on the version of Eclipse it will be done in a different way:

For Ganymede version:

  • Start Eclipse.
  • In the Menu, select "Help" and then "Software Updates".
  • In the new pop-up window, push the button "Add site ... " and enter the following address and click Ok:

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

  • Once this is done, you have to go back to the Updates and Add ons menu. The location we have entered before should appear, click on it, check the "Developer Tools" and click Install.
  • Follow the steps to install the plugin.

For Europa version

  • Start Eclipse
  • In the Menu, select "Help" , "Software Updates" and then "Find and Install".
  • Click on New Remote Site
  • In the new pop-up window, inset a name for the plugging (Android, p.e), and enter its location and click Ok:

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

  • One this is done, the new site should appear in the Add ons list. Click on it and check both “Android Developer Tools” and “Android Editor”.
  • Follow the steps to install the plugin.

Hint: If the https://dl-ssl.google.com/android/eclipse/ doest work try "http" instead of "https".

Once we have installed the Eclipse plugin we have to restart the IDE. Now, it's time to point to the plug-in where the SDK is in our system.

In the Menu, “Window”, select “Preferences”. Select Android from the left panel, click the “Browse” button and locate the SDK directory in your computer, then click OK.

Now we are able to create Android applications on our Eclipse IDE.

Netbeans

If we want to work with Netbeans, we have to download the IDE and install it. Once this is done, the next step is to download the Android plug-in for Netbeans, now called nbandroid.

The best way to install this plug-in, is using the Update Center of Netbeans. In the Menu, enter in "Tools" and then in "Plugins". Here you will be shown a list with all the available plug-ins for Netbeans. We want to add our Android plug-in. For that we have to press “Add” in the settings Tab, and enter the following location:

http://kenai.com/downloads/nbandroid/updates.xml

Now the plug-in will be available to install.

After installing the Android plug-in, now it's time to Add the Android platform to our Netbeans. In the Menu, “Tools” enter in “Java Platforms” and click in the “Add Platform...” button. Here we will find the “Google Android Platform”. In the next window we have to enter the new platform name (Android Platform, p.e) and the location of the SDK in the computer.

Once this is done, we are able to create Android apps in our Netbeans.

Want more?

In further articles I will show you how to develop an entire application.

Follow up

If you want to know when new articles are released, subscribe yourself to the Google Android RSS

Otherwise, you can follow my research, articles and work in my profesional twitter: jbeerdev


Comments

Showing all 9 comments
 
Jbeerdev Feb 21, 2011 8:53 AM
RE: Setting the Environment: Using Eclipse and Netbeans for Developing Google Android Apps
New article about Eclipse configuration here:

http://www.brighthub.com/mobile/google-android/articles/107397.aspx
divas Feb 14, 2011 7:54 AM
RE: Setting the Environment: Using Eclipse and Netbeans for Developing Google Android Apps
I already had a copy of netbeans, and i've used it before while learning java, so i used it. will get eclipse now...
Jbeerdev Feb 14, 2011 7:13 AM
RE: Setting the Environment: Using Eclipse and Netbeans for Developing Google Android Apps
So, you are using Netbeans. For anything in particular? I recommend using Eclipse... it is more mature and prepared when you work in Android.

My following article will be about Eclipse.
divas Feb 14, 2011 7:09 AM
Unable to add Android platform
yes, i downloaded the installer for windows from the link you have given. and i'm using netbeans.
do i have to install some tools using sdk manager after installing the sdk?
If you write another article on it, great! waiting for it...
Jbeerdev Feb 13, 2011 3:59 PM
RE: Setting the Environment: Using Eclipse and Netbeans for Developing Google Android Apps
Hi Divas

The way of configuring Eclipse has changed a lot since I wrote this article. I will write it again, with the new changes...

Answering your question... did you downloaded the "Android installer" from Android web page? It's like a wizard instalator where you can choose whick SDK download. Once you hace download the one you desire, just select the folder you installed inside the Eclipse Android configuration option.

Here you have the downloads:

http://developer.android.com/sdk/index.html
divas Feb 12, 2011 9:41 AM
Unable to add Android platform
I have performed till installing the plugin. but, while adding android platform. when i select 'Google Open Platform', it asks to select the platform folder. Which folder/file do i have to select? When i try to select any folder under android-sdk-windows, it shows an error saying 'A platform target should be selected'. Please help me out with this.
Jbeerdev Sep 14, 2009 10:43 AM
What is the best Flash player ap for a myTouch aka HTC Magic
I'm agree with you, Anthony.

About Flash Suport, it is said that in next release (Android 1.6) this will be "fixed". Hope so!!
Anthony Aug 16, 2009 10:18 AM
What is the best Flash player ap for a myTouch aka HTC Magic
I know that htc hero has full flash support. Yet for the rest of us android users like (HTC Magic aka myTouch) I don't understand why this wasn't the first applicatoin homebrewed considering most video based web browsing is done using flash player. There needs to be a packet that has all the current plugins and applications for flash-player, xvid,divx, and so on. If it can also play torrent files that would be awesome too. This would help google android become the best media web browser ever. Thats something I would not mind paying for. Focusing strictly on the best online media compatability and playback possible.
YS Jul 1, 2009 11:26 PM
Possible to unbricked G2
Is it possible to unbricked G2 (SPL damage)M
 
blog comments powered by Disqus
Email to a friend