gradlew app:依赖项不起作用

时间:2017-02-27 08:13:41

标签: android android-studio gradle

我想看看哪个库使用播放服务。

我在Android Studio终端中命令gradlew app:dependencies。它抛出了这个:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Projects\project\android\app\build.gradle' line: 18

* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

我的应用程序gradle的第18行是:apply plugin: 'com.android.application'

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

使用Java 8运行。

52 missmatch: http://javarevisited.blogspot.co.uk/2015/05/fixing-unsupported-majorminor-version.html

也可能在build.gradle中得到了这个?

sourceCompatibility = 1.8
targetCompatibility = 1.8