Question

Until yesterday my Android Studio was working fine and helping me to create Applications. But today, it started giving Gradle error error stating unsupport major minor version 51.0 and asking me to configue gradle.

I get the same error if I try to import the project back.

gradle error

My java version is 7 and older Android projects in the Android studio work properly.

$ /usr/bin/java -version 
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=utf8 
java version "1.7.0_07" Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) 64-Bit Server VM
(build 23.3-b01, mixed mode)

How do I solve my gradle problem with android-studio?

Was it helpful?

Solution

Last night Google team pushed version 0.7.2 of the Gradle plugin. This version requires Java7. This is a mistake.

The plugin 0.7.3 will fix it.

You can switch back from 0.7.+ to 0.7.1 in your plugin, until 0.7.3 will be available from Maven Central.

dependencies {
            classpath 'com.android.tools.build:gradle:0.7.1'
        }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top