Eclipse Color Theme

For those of you that use a dark GTK or QT theme or just prefer a dark themed editor ,eclipse color theme makes it possible to switch color themes conveniently and without side effects. eclipse color theme

You may need to install the eclipse marketplace client

After the installation, go to Window→Preferences→General→Appereance->Color Theme to change the color theme.

Eclipse Color Theme

While Eclipse allows you to change the syntax coloring in great detail, there is no support for managing multiple color themes. It is possible to achieve that by importing and exporting preferences files, but this is inconvenient and likely to mess up your preferences. Furthermore, color themes have to be created for every single editor, a theme for the Java editor does not change the XML, JavaScript or any other editors. This plugin solves these issues by mapping a generic color theme format to specific preferences entries for each supported editor.

Eclipse Color Theme currently supports the following editors:

  • Text
  • Java
  • Java properties
  • XML
  • HTML
  • CSS
  • JavaScript
  • C++
  • PHP
  • Ant
  • SQL
  • Python
  • JSP
  • Perl
  • Groovy
  • FDT
  • ActionScript/MXML (Adobe Flash Builder)
  • Ruby
  • Scala
  • FreeMarker (JBoss Tools)
  • PDE
  • ColdFusion (CFEclipse)
  • TCL
  • BibTex/LaTeX (TeXlipse)
  • R (StatET)

Available themes:

You can download additonal themes or create your own on

Preparing Debian Squeeze for Android development

Today I am going to discuss how to set up the Eclipse IDE with the Android SDK  for Android development on Debian squeeze.

To begin make sure you have the Java Development Kit  installed. I usually use sun’s Java but apparently openjdk works just as well although its not officially supported for android development. There are a few steps to go through but the commands  below will make it quick.

Step 1: Install Java

To install suns Java make sure you have edited your sources list to include the non-free repository . In order  to do this open a terminal  login as root . I will use “as root” to denote where root is required. To login as root use


then enter your root password.

To return to normal user mode type exit

To begin

nano  /etc/apt/sources.list  as root

add non-free beside main in your main source line

deb stable main contrib non-free

save the file and do an apt-get update as root

now do  apt-get install sun-java6-jdk as root

choose yes to install and accept the agreement

Java should now be installed you can test by running javac in a terminal.

Step 2: Install Eclipse

Next , we must download eclipse from

I use the classic version but any will do . For this tutorial I will be using the helios build for 64 bit architectures but its the same instructions for 32 bit ones.

download the build for you architecture and extract it when done using.

tar -xf eclipse-SDK-6.2-linux-gtk-x86_64.tar.gz

then move it to the /opt directory with the following command

mv ~/eclipse /opt as root

Step 3: Download the Android SDK

Next download the Android SDK from

once downloaded extract in the same way as we did with eclipse

tar -xf android-sdk_r11-linux_x86.tgz

then move it to the /opt directory  like so

mv android-sdk-linux_x86/ /opt as root

you should now have both the Android SDK and Eclipse in the opt directory now

the next step is to add the android developer toolkit to eclipse

Step 4: ADT Plugin

Start Eclipse, ( /opt/eclipse/eclipse) then select Help > Install New Software….
Click Add, in the top-right corner.
In the Add Repository dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:

Add ADT Repository

Click OK. Note: If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).
In the Available Software dialog, select the checkbox next to Developer Tools and click Next. In the next window, you’ll see a list of the tools to be downloaded. Click Next. Read and accept the license agreements, then click Finish.Note: If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK. When the installation completes, restart Eclipse.

Next in a terminal type


This will bring up the AVD and SDK manager  go to the available Packages in the side bar and select the API versions you wish. I usually select all of them to test against different revisions of the API. Proceed to install the selected packages  which can take a long time depending on how many you have selected and you connection speed.

Step 5: Set up a virtual device

Once that’s completed we need to make a virtual device to develop our programs on.

In Eclipse go to Window>Android SDK and AVD Manager and select new , fill out the details as required and click create.

Android Virtual Device

NOTE: it’s a good idea to make several AVD’s against the various API’s so you can thoroughly test your device.

You can now create a new android project by opening eclipse and selecting File>New>Other>Android>Android Project

(Optional )Step 6: Setting up a physical device

All credit for this section goes to unforgivin512


On the android developers website the guide for setting up a device under Ubuntu says to create the file “/etc/udev/rules.d/51-android.rules” , this does not work in the case of Debian. What you have to do in this case is

nano /lib/udev/rules.d/91-permissions.rules as root

Find the text similar to this

# usbfs-like devices SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, \ MODE=”0664″

Then change the mode to 0666 like below

# usbfs-like devices SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, \ MODE=”0666

This allows adb to work, however we still need to set up the device so it can be recognized. We need to create the file

nano /etc/udev/rules.d/99-android.rules as root

and enter

SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, ATTRS{idVendor}==”0bb4″, MODE=”0666″

NOTE: “0bb4” in this case is your vendors model (HTC in my case).

A full listing can be found here

Save the file and then restart udev as root /super user

/etc/init.d/udev restart as root

Connect the phone via USB and it should be detected when you compile and run a project.

That concludes this tutorial for today.

Fix Android Console Error: requires .class compatibility error

I recently ran into this error when migrating between versions of eclipse (due to a reinstall ), specifically from helios to indigo builds. The problem occurs due to the project being compiled against a particular Java version specified in the eclipse settings. Then when using a newer version of eclipse one will get a . class compatibility error complaining .

The error message states to select “fix project in android tools” (access by right clicking on the project folder). This did not work for me however.

I checked the Java bytecode format in “Window/Preferences”, “Java/Compiler/Compiler Compliance Level” to make sure version 1.6 was set (the version I was building against). This also did not solve the problem.

I eventually solved the problem by rebuilding the project