Minimum supported Gradle version is 2.14.1. Current version is 2.4. If using the gradle wrapper, tr

解决安卓sdk无法调试问题:

最近导入网上下载的新项目框架总是出现无法运行写个博客记录下:


Error:(1, 1) 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.4. If using the gradle wrapper, try editing the distributionUrl in E:\micky\Frame\android-app\gradle\wrapper\gradle-wrapper.properties to gradle-2.14.1-all.zip


解决方法:

down voteaccepted

You need to change File > Settings > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home path


最近gradle更新到了3.3,studio 每次重新进入项目都会提醒更新,于是手贱便点击了update。结果就是自己挖的坑把自己埋了一天半,在这记录一下,以便各位道友谨慎小心。

点击更新后发现我的项目就瘫痪了,但是打开其他的项目发现并没有出现什么问题,这是为什么呢,那么肯定是当前项目的配置有问题了,百度下还真有相似的情况,于是,Settings,搜索gradle如下:

Minimum supported Gradle version is 2.14.1. Current version is 2.4. If using the gradle wrapper, tr

一个是使用默认gradle,一个是使用本地gradle,选择默认时gradle home是不可以点击设置的

这个地方应该选择第二个使用本地gradle,然后在android studio 的安装目录下找到gradle,进行设置,如果这样重新build后报open zip file fail 这个错误,你可以找其他朋友的studio安装目录下的文件copy到自己的指定目录进行替换。

然后同时找到项目的gradle-wrapper.properties文件打开,最后一行为

distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
这个地方的gradle应该是gradle-3.3-all.zip你要把它修改成你自己studio安装目录下gradle中对应的版本。build工程你发现可能报这个错误,
Minimum supported Gradle version is 3.3. Current version is 2.14.1
这时候直接找到工程下的build.gradle,记住是工程目录下的而不是app下的build.gradle,打开,如下:

查看classpath的gradle版本,我的是2.2.0,这个已经是我修改过的版本了,之前是2.3.0这就是导致一直报错的原因,因为gradle差件的版本和gradle的是像关联的,2.14.1的gradle对应的插件最高为2.2.0不能再高了。


389down voteaccepted

You need to change File > Settings > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home path

On Mac OS, change the path in Android Studio > Preferences > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home