A. T. King
A. T. King

Reputation: 55

Unable to sync gradle

I get error messages when I try to add recyclerview and cardview dependencies to my build.gradle. Here is my build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.truewebdev.applytheme"
    minSdkVersion 17
    targetSdkVersion 23
    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:23.2.0'
compile 'com.android.support.recyclerview-v7:23.2.0'
compile 'com.android.support.cardview-v7:23.2.0'
}

Here are the error messages: error1 If I try to install repository, I get the following: error2

What is wrong here?

Upvotes: 2

Views: 90

Answers (1)

Vladimir Atanasov
Vladimir Atanasov

Reputation: 189

Did you download the Android Support Repository from the SDK Manager?

From android docs:

Make sure you have downloaded the Android Support Repository using the SDK Manager.

http://developer.android.com/tools/support-library/setup.html#libs-with-res

Upvotes: 1

Related Questions