0

My module level build.gradle file looks like this.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    defaultConfig {
        applicationId "com.appsfreelocker.puppy.pattern.lockscreen"
        minSdkVersion 16
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    buildToolsVersion '21.1.1'
}


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:21.1.1'
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'
    compile 'com.kila.apprater_dialog.lars:apprater-dialog:1.0.5'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
}

And the project level build.gradle file looks like this:

buildscript {

    repositories {
        mavenCentral()
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0'

    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

And gradle-wrapper.properties like this:

#Mon Apr 09 17:06:49 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

When I try to make a build, the build fails and gives this error:

C:/Users/abc/Desktop/PuppyLockscreen    
app/build/intermediates/res/merged/debug/values-v23/values-v23.xml  
Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.    
Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.   
app/build/intermediates/res/merged/debug/values-v24/values-v24.xml  
Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. 
Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.    

Gradle Verison is 2.10 and Android Plugin Version is 2.0.0

I have used this reference to make sure that I am using the correct combination of Gradle versions, Android Plugin Version, compileSdkVersion, and buildToolsVersion.

Can anyone please point out whats causing the error and how to fix it.

1 Answer 1

0

This library

compile 'com.kila.apprater_dialog.lars:apprater-dialog:1.0.5'

has a dependency with

compile 'com.android.support:appcompat-v7:25.3.1'.

Then you have to use:

compileSdkVersion 25
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.