支持的最低 Gradle 版本是 2.14.1。当前版本是 2.10
Minimum supported Gradle version is 2.14.1. Current version is 2.10
我正在尝试使用 gradle 命令行构建我的项目,但它一直抛出异常
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Minimum supported Gradle version is 2.14.1. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in /mnt/c/Users/USER/Documents/Projects/fdroiddata/build/com.simpledecredwidget/gradle/wrapper/gradle-wrapper.properties to gradle-2.14.1-all.zip
完整的错误是here
这是位于 $projectroot/gradle/wrapper
的 gradle 包装器,这是我的 gradle 包装器
的内容
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
我已尽我所能,但它不起作用,如您所见,我已经修改了我的 distributionUrl
并且它一直显示相同的错误并指向相同的文件,请以任何方式帮助我你可以。
谢谢。
如果您使用 gradle 包装程序,则应使用 gradlew clean build
命令。因为如果你将使用gradle clean build
命令,它仍然会使用你本地的gradle,我认为它是2.10版本。这就是你出错的原因。使用 gradlew
命令,首先它将下载您在 .properties 文件中定义的 gradle 2.14.1 版本,然后它将下载 C:\Users\yourusername.[=16 下的 2.14.1 发行版=] 文件夹。您需要在命令行中查看下载过程。
您应该为每个 gradle 版本使用所需的 Android 插件版本。
如果您使用 gradle 4.1+,您应该使用插件 3.0.0+。
You can specify the Gradle version in either the File > Project Structure > Project menu in Android Studio, or by editing the Gradle distribution reference in the gradle/wrapper/gradle-wrapper.properties file. The following example sets the Gradle version to 4.1 in the gradle-wrapper.properties file.
更多信息:https://developer.android.com/studio/releases/gradle-plugin.html
我正在尝试使用 gradle 命令行构建我的项目,但它一直抛出异常
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Minimum supported Gradle version is 2.14.1. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in /mnt/c/Users/USER/Documents/Projects/fdroiddata/build/com.simpledecredwidget/gradle/wrapper/gradle-wrapper.properties to gradle-2.14.1-all.zip
完整的错误是here
这是位于 $projectroot/gradle/wrapper
的 gradle 包装器,这是我的 gradle 包装器
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
我已尽我所能,但它不起作用,如您所见,我已经修改了我的 distributionUrl
并且它一直显示相同的错误并指向相同的文件,请以任何方式帮助我你可以。
谢谢。
如果您使用 gradle 包装程序,则应使用 gradlew clean build
命令。因为如果你将使用gradle clean build
命令,它仍然会使用你本地的gradle,我认为它是2.10版本。这就是你出错的原因。使用 gradlew
命令,首先它将下载您在 .properties 文件中定义的 gradle 2.14.1 版本,然后它将下载 C:\Users\yourusername.[=16 下的 2.14.1 发行版=] 文件夹。您需要在命令行中查看下载过程。
您应该为每个 gradle 版本使用所需的 Android 插件版本。
如果您使用 gradle 4.1+,您应该使用插件 3.0.0+。
You can specify the Gradle version in either the File > Project Structure > Project menu in Android Studio, or by editing the Gradle distribution reference in the gradle/wrapper/gradle-wrapper.properties file. The following example sets the Gradle version to 4.1 in the gradle-wrapper.properties file.
更多信息:https://developer.android.com/studio/releases/gradle-plugin.html