Coding for Android on Windows - Set up your machine

by Christian Tendyck

This page is the first chapter of the article Coding for Android on Windows.
Feel free to write comments or add content.


Set up your machine

Before you can start coding, you have to download and install a few programs. First of all there is Eclipse. If you are used to Java, you will probably know how to use Eclipse. Furthermore you need to download the Android SDK (Software Development Kit) and ADT (Android Development Tools). The NDK is just needed if you are planing to use native code. That means to write a part of your program in C or C++ or to use C-libraries. Then you also have to install the C/C++ Development tool for eclipse. You can do this via "help/install new software" in eclise. Follow the instructions on this site. To compile C code in eclipse, you need another tool called Cygwin. With Cygwin you can emulate some kind of a Linux console. This is the only way I know to compile C-Code in Eclipse on a Windows machine. Some really common standard C++ libraries cannot be used when compiling with the NDK. But there is a modified version of it called Crystax that allows you to use these libraries.


Create a virtual device

If you do not have an Android phone on your own or if you do not want to upload your apps on your phone everytime to check if your code is working, you can create a virtual device. A virtual device is an emulator of an Android phone. It is very easy to create it. I assume you have already installed the Android SDK. Start Eclipse and click on "Window/Android SDK and AVD Manager". Install the packages you need. That means, download the package with the correct plattform version you want to code for. Then, click "virtual device/new". Choose a name and a target and if you want to, you can also create a virtual SD Card. This is very helpful if you are planing to use the SD Card on your real phone as well. Eclipse will create a file "sdcard.img" that is as big as you have chosen it to be. To mount it as a virtual hard disk, you need a program like ImDisk Virtual Disk Driver. You can create folders on your virtual SD card and use it as any other SD Card.


Next Chapter: First Projects


Back to Coding for Android on Windows

Alumni Liaison

has a message for current ECE438 students.

Sean Hu, ECE PhD 2009