Android Studio fails - unsupport unsupported major minor version 51.0

妖精的绣舞 提交于 2019-12-07 17:28:10

问题


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.

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?


回答1:


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'
        }


来源:https://stackoverflow.com/questions/20796827/android-studio-fails-unsupport-unsupported-major-minor-version-51-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!