Ika
Ika

Reputation: 1556

Error:(20, 118) No resource found that matches the given name (at 'drawable' with value '@drawable/abc_list_selector_disabled_holo_dark')

Using the latest version on android (23) with com.android.support:appcompat-v7:23.0.1 and com.android.support:design:23.0.1

I'm getting the following error

Error:(20, 118) No resource found that matches the given name (at 'drawable' with value '@drawable/abc_list_selector_disabled_holo_dark').

enter image description here

When clicking on the error I see that I can get to the drawable enter image description here

On similar cases in stackoverflow I see a mismatch between the versions number like in the following case

My Gradle file looks like this:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "a.b.c.d.defg"
        minSdkVersion 7
        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.0.1'
    compile 'com.android.support:design:23.0.1'
}
}

Upvotes: 1

Views: 1882

Answers (3)

Preetish Priyadarshi
Preetish Priyadarshi

Reputation: 81

You can resolve the issue in two ways:

1. Move the Project folder location to a shorter directory name.

2. Window support maximum file path of 260 character.
To allow more than 260 character you need to do Registry Edit in windows

Goto RegEdit -> Right-click on FileSystem
-> Choose New > DWORD (32-bit) Value
-> Name the new value LongPathsEnabled
-> Change the value from 0 to 1 in the “Value data” box -> Press OK
-> Restart PC

Upvotes: 0

Yonas Alemayehu
Yonas Alemayehu

Reputation: 111

great answer by Ika. I faced the exact same issue and problem was solved by making the overall patch short including the project name.

Upvotes: 0

Ika
Ika

Reputation: 1556

I found the issue and it had nothing to do with the description above.

Thanks to @fvasquezc23 suggestion in this question I looked and found that my path in was longer than 255 characters.

I moved the project location and shortened the directories names.

It is most likely that the paths that gave me the error were just longer than the path limit.

Unfortunately, I didn't supply the path in my question so it was hard to provide a good advice.

Upvotes: 9

Related Questions