1

I built my app with version 23 but I had some issues with permissions. Now I want to come back to version 22 but I find this error:

/Users/m/AndroidStudioProjects/50-anys/app/build/intermediates/res/merged/debug/values-v23/values-v23.xml
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(24) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

This is my gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.example.main"
        minSdkVersion 14
        targetSdkVersion 22
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile files('libs/Vuforia.jar')

    compile "com.android.support:support-v4:22.2.1"
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.android.support:support-annotations:22.2.1'
    compile 'com.github.paolorotolo:appintro:3.3.0'
}

There is no 23 anywhere. Any idea?

1
  • after dependency changes, did you run 'clean' before the build? Commented Jan 15, 2016 at 15:26

2 Answers 2

2

I believe it is because com.github.paolorotolo:appintro:3.3.0 also uses appcompat-v7.

Try replacing compile 'com.github.paolorotolo:appintro:3.3.0' with this:

compile ('com.github.paolorotolo:appintro:3.3.0'){
    exclude module: 'appcompat-v7'
}

Edit: Actually, com.github.paolorotolo:appintro:3.3.0 uses

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

And your compile and target is 22, which may be your problem.

Sign up to request clarification or add additional context in comments.

1 Comment

It worked but I had to write compile ('com.github.paolorotolo:appintro:3.3.0')...
1

I also got the same problem while trying to add the following library to my project: https://github.com/alamkanak/Android-Week-View

I discovered that the library had this in its build.gradle file:

dependencies {
    compile 'com.android.support:appcompat-v7:23.1.1'
}

The case was: My project's targetSdkVersion was 22 and the library I tried to use requires appcompat for sdk version 23.

Trying to fix it I discovered that Gradle doesn't let you use the 'appcompat-v7:23.1.1' if your targetSdkVersion or compileSdkVersion are not 23.

Solution: To fix it I added the following to my compile statement:

compile ('com.github.alamkanak:android-week-view:1.2.6'){
    exclude module: 'appcompat-v7'
}

Note: If you try this, you will see that it works. But be careful, since you are excluding a module from the library, you may run into many issues by doing this. Pray to god that it doesn't happen.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.