Install Android SDK and NDK

I prefer to do everything in the virtual environment – just not to let the development tools ruin my main Windows 7 based PC with Day Of Defeat: Source installed on it.. I just do not like when Visual Studio suddenly pops up suggesting me to debug the crashed steam process or hl2.exe… so to do things in Android world I had to install the ubuntu linux into the latest version of VMWare Player…

So, get the Ubuntu 32 bit ISO from http://www.ubuntu.com, fire up your VMWare Player and install it as you probably done many times. When the installation is finished, reboot and let the Update Manager do his work…

Now go to http://developer.android.com/sdk/index.html and get the Android SDK for Linux (android-sdk_r07-linux_x86.tgz). Unpack it to /opt/android folder. Do the same for Android NDK downloaded from http://developer.android.com/sdk/ndk/index.html (android-ndk-r4b-linux-x86.zip).

Good, now you should have the following structure in the /opt directory

/opt/android/android-sdk-linux_x86
/opt/android/android-ndk-r4b

Add the following paths to your .bashrc export PATH=${PATH}:/opt/android/android-sdk-linux_x86/tools:/opt/android/android-ndk-r4b to make it easier in the future to run the command line based utilities and tools from the SDK and NDK.

Now we will continue with the overall setting up of the development environment for the Android platform. Cool :)

First, we need to install Java platform from Sun (Oracle). To do that, open the /etc/apt/sources.list with e.g. nano, find and uncomment the following line deb http://archive.canonical.com/ubuntu maverick partner. Then issue the sudo apt-get update in the terminal to update the apt package database and finally sudo apt-get install sun-java6-jdk to install java. Wait quite a little until it all gets downloaded and installed.

Second, we need Eclipse to run the famous code/compile/run/wonder/debug/think cycle… so type sudo apt-get install eclipse in the command terminal and wait once again until installation is finished. This again takes so much time that could play a whole map (say Palermo or Donner) but anyway… it all finishes finally right?

Third, after Eclipse is installed we have to add the C/C++ Development Tools (so called CDT) to it.. as we are going to program in C/C++. Eclipse almost does that for you, just fire it up, choose Help / Install New Software and select the latest CDC tools from Galileo Update Site. Wait again for a while.

Finally we need to install the Android ADT plugin for Eclipse that will let you wrap your nice razor fast C++ into ugly, verbose and bloated Java. To install the ADT add the https://dl-ssl.google.com/android/eclipse as the software source site and choose Developer Tools / Android DDMS and Android Development Tools from Available Software wizard page. After installation finishes and your restart your Eclipse, configure path to SDK in it by choosing the Window / Preferences / Android menu and browsing for the SDK at /opt/android/android-sdk-linux_x86. Restart Eclipse once again.

Continue configuring the ADT by selecting Window / Android SDK and AVD Manager / Available Packages. I prefer to choose only packages for the latest version of Android as indicated on the following screen. After all packages are selected hit the Install Selected button and wait until it all gets downloaded from the Google’s web site.

The last thing to do is to make an instance of emulator that will be used for running your applications. Go to Window / Android SDK and AVD Manager / Virtual Devices and add a new virtual device you like most (I named it AndroidDevice). Start it and have fun looking around!

Next we will start Java / C++ programming in Android world…

About sichent

sichent
This entry was posted in Android. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s