File Res/Drawable/Abc_Ic_Ab_Back_Material.Xml from Drawable Resource Id #0X7F020016

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

I think you need to make changes in your gradle.

// Gradle Plugin 2.0+  
android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}

You’ll note this new attribute only exists in the version 2.0 of the Gradle Plugin. If you are using Gradle 1.5 you’ll instead use

// Gradle Plugin 1.5  
android {
defaultConfig {
// Stops the Gradle plugin's automatic rasterization of vectors
generatedDensities = []
}
// Flag to tell aapt to keep the attribute ids around
// This is handled for you by the 2.0+ Gradle Plugin
aaptOptions {
additionalParameters "--no-version-vectors"
}
}

I found similar question here.

See Support Vector Drawables and Animated Vector Drawables in Android Support Library update.
I hope its help you.

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

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.

android.content.res.Resources$NotFoundException on api19

Copying the drawable to project res folder solved issue. Thanks for Shaishav

Vector Drawables flag doesn't work on Support Library 24+

Ugh... I hate it when this happens. You ask a question and then answer it yourself a few hours later. Anyways, it appears as though I was using an outdated build tools version. All I had to do was change one line in my gradle:

buildToolsVersion "24.0.1"

Cannot inflate toolbar on pre L devices

Found the answer: https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88#.adypg3azu

Update Android Support Library to 23.2.0 cause error: XmlPullParserException Binary XML file line #17<vector> tag requires viewportWidth > 0

Seems that updating to support library 23.2.0 will cause this problem

For those who don't want to make further details, you only need to do the following:

If you have Gradle version 2.0 or above:

android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}

or if you have version 1.5 or below:

android {
defaultConfig {
// Stops the Gradle plugin’s automatic rasterization of vectors
generatedDensities = []
}
// Flag to tell aapt to keep the attribute ids around
aaptOptions {
additionalParameters "--no-version-vectors"
}
}


Related Topics



Leave a reply



Submit