“最低支持的Gradle版本是2.14.1.当前版本是2.10.错误 [英] "Minimum supported Gradle version is 2.14.1. Current version is 2.10." error
问题描述
我正在尝试升级我的Android应用程序,但出现以下错误:
I am trying to upgrade my Android application but I am getting the following error:
受支持的最低Gradle版本是2.14.1.当前版本是2.10.如果使用gradle包装器,请尝试将C:\ Users \ MyUser \ Desktop \ myproject \ gradle \ wrapper \ gradle-wrapper.properties中的distributionUrl编辑为gradle-2.14.1-all.zip
Minimum supported Gradle version is 2.14.1. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in C:\Users\MyUser\Desktop\myproject\gradle\wrapper\gradle-wrapper.properties to gradle-2.14.1-all.zip
这是拒绝在build.gradle(Project: myproject)
上显示的行:
This is the line refearing to gradle on build.gradle(Project: myproject)
:
classpath 'com.android.tools.build:gradle:2.1.3'
我将minSdkVersion
和targetSdkVersion
分别设置为16和24.
And I have minSdkVersion
and targetSdkVersion
sets to 16 and 24 respectively.
我尝试过的事情
-
选项1 :右键单击我的项目>打开模块设置项目>项目> Gradle版本并设置2.14.1.
Option 1: Right click on my project > Open Module Settings Project > Project > Gradle version and setting 2.14.1.
选项2 :关闭IDE,删除gradle文件夹并重新启动Android Studio
Option 2: Close the IDE, delete gradle folder and restart Android Studio
选项3 :将classpath
更改为版本2.1.3之后,我进入了File> Invalidate Caches/Restart ...> Invalidate并重新启动
Option 3: After changing the classpath
to version 2.1.3, I have gone to File > Invalidate Caches/Restart... > Invalidate and Restart
选项4 :我更改了C:\ Users \ MyUser \ Desktop \ myproject \ gradle \ wrapper \ gradle-wrapper上的distributionUrl
属性.properties到gradle-2.14.1-all.zip
Option 4: I have changed the distributionUrl
property on C:\Users\MyUser\Desktop\myproject\gradle\wrapper\gradle-wrapper.properties to gradle-2.14.1-all.zip
但是这些选项中的任何一个都起作用.
but any of these options work.
我该怎么办才能解决此错误?
What can I do to solve this error?
提前谢谢!
推荐答案
确保使用默认的gradle包装器.
make sure you use default gradle wrapper.
打开文件>设置(或在Mac上为Android Studio>首选项...),在对话框中,导航至Build,Execution,Deployment> Build Tools> Gradle.
Open File > Settings (or Android Studio > Preferences... on Mac), in the dialog navigate to Build,Execution,Deployment > Build Tools > Gradle.
然后单击使用默认的gradle包装器(推荐)",然后取消选中脱机工作.
then click use default gradle wrapper (recommended) and uncheck offline work.
这篇关于“最低支持的Gradle版本是2.14.1.当前版本是2.10.错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!