Failed to apply plugin

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
   > Minimum supported Gradle version is 3.3. Current version is 2.14.1. If using the gradle wrapper, try editing the distributionUrl in /Volumes/Macintosh-HD/Users/kokia_Android/BaseAdapter源码/testCoding/gradle/wrapper/gradle-wrapper.properties to gradle-3.3-all.zip

1、使用阿里云Maven镜像库;

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        //jcenter()
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        //jcenter()
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

2、修改 gradle 版本和插件版本;

我本地配置的gradle是2.14.1;

Gradle version 和 Android Plugin Version 要对应;

as.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容