Home Ask Login Register

Developers Planet

Your answer is one click away!

Paul Joseph Dar Santos February 2016

Material Design build.gradle error

I have a problem in my build.gradle file, the compileSdkVersion and buildToolsVersion doesn't match.

Here is my build.gradle:

    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 22
    buildToolsVersion '23.0.2'

    defaultConfig {
        applicationId "com.emergencyapp"
        minSdkVersion 18
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    dexOptions {
        preDexLibraries = false

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.android.support:design:22.2.1'
    compile 'com.jakewharton:butterknife:6.1.0'
    compile 'com.google.android.gms:play-services:8.4.0'

And here is my error:

enter image description here

I think it is the buildToolsVersion and the dependencies are causing the problem.


pratik gaikwad February 2016

please set targetSdkVersion 23 and dependencies

Shree Krishna February 2016

I was having the same problem, What I did is

  1. First be sure that you have API level 23 (marshmallow/ android 6) installed.
  2. Set compileSdkVersion to 23 and dependencies libraries also to greater than 23.
  3. Clean and build the project.

LinX64 February 2016

Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

Since you are using version 23 of the SupportLibrary, you need to compile against version 23 of the Android SDK.

Just change your compile sdk to 23, already has an answer from Google:


compileSdkVersion 23

Gabriele Mariotti February 2016

Since you are using

compile 'com.google.android.gms:play-services:8.4.0'

You have a dependency with the support libraries v.23, also if you are declaring v22.
It means that you have to compile with api 23.

Just use:

compileSdkVersion 23

Otherwise use an older version of the com.google.android.gms:play-services

Post Status

Asked in February 2016
Viewed 2,615 times
Voted 12
Answered 4 times


Leave an answer

Quote of the day: live life