I can’t compile a default new project for Android 2.1 because(?) the JDK used by Android Studio is JDK 1.7 but it should be JDK 1.6.
To change it I go to File -> Project Structure and try to find the JDK 1.6 location.
http://askubuntu.com/questions/467870/how-to-set-the-jdk-for-android-studio