Developers can be very picky when it comes to the tools they use daily. Some use a simple text editor, some want a full graphical environment complete with syntax highlighting, code completion, organized debugger output and file/project management.

Depending on the language I’m using for a project, I sometimes go both directions. I frequently use GNU Nano when writing PHP or Python, but prefer a full graphical development system when writing C, Objective-C, or Java, especially when I need to debug code on a separate device like an iPhone.

I spend quite a bit of time in Xcode while writing code for iOS, and while it certainly has flaws, I find Xcode to be generally a pleasure to use. With a very small amount of setup, a single click can run code changes right on the connected iPhone or iPad, and another click can switch between totally separate build profiles for beta testing, development and debugging, or releases for the App Store.

So when I decided to jump into Android development, it was quite a shock to go from Xcode to Google’s preferred IDE, Eclipse. Like I said before, developers can be very picky, and I just can’t work in Eclipse. Luckily Google hasn’t actually tied Android development to Eclipse in any significant way, I say they prefer Eclipse because they built a plugin for it that streamlines creation of new Android projects, building user interfaces and running code in the Android emulator or right on an Android device, similar to the way Xcode works for iOS development.

Eclipse is not the only IDE available for Java development though, and while I hadn’t actually used any of them before, I found out that there were 3rd party Android plugins available for some of them, specifically IntelliJ and Netbeans. Of course neither of them are native Mac applications, but I’m not THAT picky; as long as the program works well and stays out of my way, I’m flexible.

Unfortunately the Android plugin for IntelliJ seems to require the paid version (if this isn’t the case, please let me know!). Update: As pointed out by Lennox in the comments, the Android plugin for IntelliJ IDEA is free to use in the community edition. I’m going to give it a shot soon and see how well it works.

I decided to give Netbeans a try and was pleasantly surprised. If you’ve never used Netbeans before, it can be overwhelming just like Eclipse, however after spending a half hour toying around I became very comfortable with it.

If you can’t stand using Netbeans either, this article won’t be much help to you, but perhaps you can look into the paid version of IntelliJ and let me know how it works out.

To get started, visit http://netbeans.org/ and install the Java SE version which has everything you will need for Android development. The other versions should all work, but they include extra features and packages that aren’t necessary for our purposes.

Once you have Netbeans installed, run it and you should see either a welcome screen, or something like this:

You’ll want to click the Tools menu, which will be at the top of the screen on a Mac, or inside the Netbeans window on Linux or Windows. Then click Plugins, select the settings tab and you should get a screen like this:

Click the Add button.

Use “nbandroid” as the name, and enter http://kenai.com/downloads/nbandroid/updatecenter/updates.xml as the URL. This is an update source for the 3rd party Android plugin, which is being maintained on Project Kenai, which is run by Oracle, the same Oracle who now owns the Java codebase since they bought Sun Microsystems last year.

Click OK, then head over to the Available Plugins tab, and you’ll see a new plugin called Android is available. Tick the box next to its name and click Install.

A new window will pop up, click through and accept the license (after reading it, of course).

Now you can close the plugins window, however you can’t use the plugin yet, you will need to tell Netbeans that there is a new development platform available since Android isn’t just built on top of Java SE.

You’ll need to click Tools again, then Java Platforms.

You should see the default JDK 1.6 platform, but we need to tell it there are more in the Android SDK directory. Click Add Platform.

Now you should see a new option under Java Standard Edition called Google Android Open Handheld Platform. Select that and click next.

Now you’ll need to know where the Android SDK is located on your computer, once you’ve found it, select the folder and click next.

Because the Android SDK is a complete “platform” much like Java 5 or Java 6, we’ll need to add each version we want to develop for one at a time. For now I’ll add Android 2.2 (technically version 8 of the platform APIs), you can go through this section again and add each platform version you need to develop for.

Once you’ve added a platform it will show up in the platforms window just like JDK 1.6.

Now when you go back to the main Netbeans screen, you should see a new section in the Services menu called Android. If you don’t see it, click the Window menu and select Services. This new section will show you any Android devices you may have connected.

When I was writing this article I had a Nexus One connected, and you can see it shows up as HT9CNP809131, and you can also see the running Dalvik VM processes under it. Right clicking each one will let you force a garbage collection cycle on the VM, kill it or see the properties of that particular VM instance.

With the plugin installed, you can start developing Android applications, and Netbeans will assist you in setting up a new project, offering code completion, and when you go to compile and run the application, Netbeans can now start the Android emulator or run the code right on your device if you have one connected.

Another very nice feature of the Android plugin is that Netbeans is now aware of adb, and can show you the live device log right in the IDE while you’re developing (Window > Output > ADB log):

That’s pretty much it, with this Netbeans plugin, developing for Android is almost as nice as developing for iOS, and if you aren’t super picky, you can probably get used to Netbeans even if you would prefer to use something else.

Feel free to leave comments and questions below.