Under Android Studio, I am trying to build my project. There is no problem when using the classic Build or Run button, but when I try to build it through the command, using gradlew build
, it fail with the message Unsupported major.minor version 52.0
. In fact every command using gradlew
fail. And I need it to publish my stuff to Bintray.
I am already using the latest Java 1.8 JDK, tried to clear and download every library but nothing work.
Resolved. gradlew
was actually still using Java 1.7 (which I could check with gradlew --version
), even if Android Studio was correctly set to 1.8. I had to change the JAVA_HOME environment variable to a correct jdk and restart Android Studio to correct the bug.