In my previous post I moved my first steps in Android development world by installing Android SDK and Eclipse IDE on my desktop computer. After successfully writing my first Android hello-world I went, almost immediately, on how to do Android development on the EEEPC 900. If it's true the desktop computer is much more suited for writing code it's the EEEPC tho one I always bring with me and I use for my experiments.
I'm a big fan of Eclipse and I use it everyday at work but, when it comes using it on a netbook, it performs very poorly. Worst of all some Eclipse configuration windows are too big to fit into the small EEEPC screen and even lack of scroll-bars. This is why I use Netbeans on the EEEPC. After a brief looking-up on the 'net I came to NBAnroid plug-in page.
Installing Netbeans to 7.2
Even if it isn't required I decided to upgrade my Netbeans installation to the latest 7.2 version. I so removed previous version by launching Netbeans removal script
then I downloaded latest Netbeans version from its download page and launched the auto-installing script
chmod +x netbeans-7.2-ml-javase-linux.shsudo ./netbeans-7.2-ml-javase-linux.sh
this started the usual Netbeans installation wizard
after some “I agree” and several “Next” I got the new version installed.
Installing Android SDK
Like in my previous post I downloaded Android SDK from Google's page and extracted it on my home folder
mkdir androidmv Downloads/android-sdk_r20.0.3-linux.tgz android/
tar -xf android-sdk_r20.0.3-linux.tgz
Installing NBAndroid plug-in
I installed then the NBAndroid plug-in from Netbean's plug-in manager:
I selected the “Add ...” button in the “Settings” tab and went into the update center customizer
where I did set the plug-in update URL (plug-in for older Netbeans versions has a different URL).
Then I selected “Android” from the available updates
by pressing “Install” the plug-in installation wizard started, NBAndroid has a dependency with the Android-Lint plug-in
after the usual License agreement and a warning about the plug-in being signed from a not-trusted certificate the installation completes. I then set the Android SDK path in Netbeans options (in the Miscellaneous/Android tab)
Then I started the Android SDK manager (there is a “”Android and AVD Manager” item in the “Tools” menu)
I then selected “Android SDK Platform Tools” and “Android 4.1 (API 16)” for download. Because of the smaller disk space on the EEEPC I've been able to install only one Android API version. Not a big problem since the netbook is not going to “production” computer but only one for experiments. After some more downloading I've been able to write my first Application.
I selected “Android Project” from the “New Project” window and I got the new Android application window where I cold set basic application parameters: name, package, activity name and target platform.
at the beginning I was a little startled seeing the code marking en error at the line
looking for it in the 'net I discovered that this plug-in, unlike the eclipse one, writes the automatically generated class “R” only after the first build command. After pressing the build button the error mark in fact disappeared.
Like with Eclipse you can run your Android application just by hitting the run or the debug button. I tried using a virtual device, after by defining it with the AVD Manager but it's so painfully slow to load. So running an application on a real device is the only viable solution on low performances computers like the EEEPC. After editing the “51.android.rules” file just like in my previous post the new hello-world application has been regularly deployed to my phone.