Resources$NotFoundException while using support-vector-drawable
Restart android studio and your problem will solve .....
if it will not solve than put ic_menu_settings.xml file into drawable folder
VectorDrawableCompat Resources$NotFoundException on KitKat and below
I found the problem: I had my vector-drawables in drawable-anydpi/ - this produces this crash - when i move the drawables to drawable/ it works fine
VectorDrawable Resources$NotFoundException while xml vector drawable resource file does exist
When I was applying patch for gradient sections I noticed that AndroidStudio highlighted these gradient sections saying that it is supported from API 24 and my project min API is 21. So I have decided to check other warnings like:
Very long vector path (1456 characters), which is bad for performance.
Considering reducing precision, removing minor details or rasterizing
vector.
So I've started suspecting it as an issue source because there was an error message (red colored text) given in build window of AndroidStudio stating:
string too large to encode using UTF-8 written instead as
'STRING_TOO_LARGE'.
But there is no glue or pointing to source of this problem, its just states that I have a very long String somewhere in my project, so it could be preshipped realm database file for instance or something like.
Finally I found an anomaly in one of my vector drawables - it was a path string containing about 51k chars! Of course no warning was given to me at importing time (svg to xml, done using AndroidStudio).
Removing this path solved the crash issue but also a part of an image was lost.
So I've degrouped a problematic path group using Sketch and after importing it resulted in 2 paths of 19k and 24k chars, which is not good either, but it works now without any crash.
btw I am unable to find any information on string length limitations for vector/xml but gradle does apply this limitation at build time, so its known.
The limit of one xml string length revealed in this SO question and there is no official document on that could be found.
Resources$NotFoundException for ImageView with vector drawable
Self-answering:
Moving the xml from drawable-anydpi
to drawable
fixed the problem. (but the layout editor still doesn't work).
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"
Related Topics
Display a Part of the Webpage on the Webview Android
How to Use Mkfifo Using Android's Ndk
Cli on Dalvikvm Fails on Jni Lib
Android Draw Route on a Mapview with Twoo Poi-S
Creating Different Layout for Android Phone and Tablet
How to Switch Automatically Between Viewpager Pages
Set Language to French in Android Datepickerdialog
Java.Lang.Noclassdeffounderror: Failed Resolution Of: Landroid/Support/V4/Os/Buildcompat
Android - Navigation View Item Menu Background Color
Using Onclick Attribute in Layout Xml Causes a Nosuchmethodexception in Android Dialogs
How to Add "Android Design Support Library" to Eclipse with Adt-Plugin
How to Update UI from Asynctask
@Android Display /Res/Viewable in Webview
How to Load a Image from Assets