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,
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 GraphicsCopy 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
Close Application and Remove from Recent Apps/
Android Communication Between Two Applications
Android Slidingdrawer from Top
Check Whether Activity Is Active
How to Change Action Bar Title Color in Code
Android Path to Asset Txt File
Android Google Maps, How to Make Each Marker Infowindow Open Different Activity
Android 5.0 Material Design Style Navigation Drawer for Kitkat
Choosing Photo Using New Google Photos App Is Broken
Android: Get Height of a View Before It's Drawn
How to Get the Number of Unread Gmail Mails (On Android)
How to Set the Language in Speech Recognition on Android
How to Create Android Spinner Without Down Triangle on the Right Side of the Widget
How to Listen to Doubletap on a View in Android
Android Eclipse Noclassdeffounderror for External .Jar Files
How to Implement Draggable Map Like Uber Android, Update with Change Location