Max Fratane
Max Fratane

Reputation: 876

res/drawable/abc_ic_ab_back_material.xml Resources$NotFoundException on Kitkat

I DO know there is a lot of questions about this. I've already tried everything, without success.

Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml

File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020016

Android: getting Resources$NotFoundException for abc_ic_ab_back_material

Yes, i've already tried downgrade compileSdkVersion and buildToolsVersion(and also the dependencies) to 24.x.x and 23.x.x, same error occurs.

I'm using Genymotion to emulate 4.4 android version.

Is there any possibility of being a Genymotion bug(I don't have a kitkat device to test)?

gradle of the app module:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"

    defaultConfig {
        applicationId "maxfratane.qrcode"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:1.0.0'
    compile 'com.android.support:design:25.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.android.support:cardview-v7:25.1.0'
    compile 'com.android.support:recyclerview-v7:25.1.0'
    testCompile 'junit:junit:4.12'
}

project gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

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

I simply don't know what to do anymore. I need this app running on 4.4 devices.

Upvotes: 1

Views: 1002

Answers (2)

Sandeep PC
Sandeep PC

Reputation: 867

I have tried all the possible answers and none worked for me.So if anyone is still having issue then here are my two cents:

  1. Change all your android ui widgets to AppCompat widgets. Example : TextView -> android.support.v7.widget.AppCompatTextView (This is because the latest version is not having support for older android version like 4.4 kitkat)
  2. I was having this issue on buildToolsVersion '26.0.2' so downgrading to '25.0.3' worked also.(Note:Not the best way as this was observed on specific devices only)

Upvotes: 0

Pankaj Kumar
Pankaj Kumar

Reputation: 82958

There is two solution,

  1. Make your application to use vector drawable, and use vector for back abc_ic_ab_back_material.xml. Lern more at Add Multi-Density Vector Graphics

  2. Copy png, ic_menu_back.png from sdk for back icon and paste it into your project.

Upvotes: 3

Related Questions