Search code examples
androidandroid-support-libraryjava-6

Error while creating new project with java 6


I am trying to create a new android project with java 6(JDK 1.6.0_18). My 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'
}

when I build it I see this error:

enter image description here

In my sdk manager:

enter image description hereenter image description here

I have got everyting installed but I still get this error. Any ideas how to fix this issue?


Solution

  • The first version of the Android Design support library is the "22.2.0". You are using the "20.0.0", which doesn't exist. You can checkout the first version in the developers blog post:

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

    It's important to note that you should be using the SDK compile version 22 to use it (check the major number version).