Android SDK with Open JDK 1.7 and IntelliJ IDEA 11

I updated my installation of IntelliJ IDEA to the latest version and suddenly I couldn't compile any Android project, getting a message telling me the .class files couldn't be found. Very puzzling!

I tried upgrading the JDK from Openjdk 6 to Open JDK 7, but the Android SDK refused to compile because it wanted a Java 1.6 level SDK.

Thankfully after much searching I discovered a post that mentioned that IntelliJ 11.1 would be able to compile using 1.7. Thus I downloaded the Early Access Program version of IDEA and crossed my fingers. Well, sort of; what I did was configuring the IDE to use Java 1.7 both as the project SDK and as the Java SDK for the Android build target I was going to use (2.3.3 in this case).

After this, I could compile and run my application without any issues.

(This is all with ArchLinux --it might or not work in your particular system)