I\'m trying to compile my Android project and I\'m getting this error
[INFO] Exception in thread \"main\" java.lang.UnsupportedClassVersionError: com/android
Initially I had downgraded buildToolsVersion from 24.0.0 rc3 to 23.0.3, as specified in Rudy Kurniawan's answer. Then I have noticed that I have jdk 7 specified in my project settings. I have changed it to jdk 8 and now build tools 24.0.0 rc3 work.
It's also important to have compile options set to java7:
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}