使用 java 6 创建新项目时出错

Error while creating new project with java 6

我正在尝试使用 java 6(JDK 1.6.0_18) 创建一个新的 android 项目。 我的 gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.sample.java6"
        minSdkVersion 14
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:20.0.0'
    compile 'com.android.support:design:20.0.0'
}

当我构建它时,我看到了这个错误:

在我的 sdk 管理器中:

我已经安装了一切,但我仍然收到这个错误。有解决此问题的想法吗?

Android 设计支持库的第一个版本是“22.2.0”。您正在使用不存在的“20.0.0”。您可以在 developers blog post:

中查看第一个版本

You can then start using the Design library with a single new dependency: compile 'com.android.support:design:22.2.0'

需要注意的是SDK编译版本22才能使用(查看主版本号)