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 要对应;

Failed to apply plugin_第1张图片
as.png

你可能感兴趣的:(Failed to apply plugin)