Update 2 : they added the ability to enable it again in the 23.4.0 support library:
For AppCompat users, we have added an API to re-enable support for vector drawings from resources (the behavior found in 23.2) using AppCompatDelegate.setCompatVectorFromResourcesEnabled () - keep in mind that this may still cause memory problems and update problems instances of Configuration, so why is it disabled by default.
Update : This no longer works since version 23.3.0
For AppCompat users, we decided to remove features that allow the use of vector drawings from resources on devices prior to Lollipop due to problems found during implementation in version 23.2.0 / 23.2.1 [ https://code.google.com/p/ android / issues / detail? id = 205236 , https://code.google.com/p/android/issues/detail?id=204708] . Using the application: srcCompat and setImageResource () continues to work.
From the announcement of Google+ developers on Google+
Using AppCompat and the application: srcCompat is the most reliable way to integrate vector drawings into your application.
This quote is from the official blogpost for the release of version 23.2.0 in the Support Library.
The message also mentions the following:
You will find direct access to vector drawings outside the app:srcCompat , which will not run until Lollipop. However, AppCompat supports loading vector vectors when they are referenced in another container, such as StateListDrawable , InsetDrawable , LayerDrawable , LevelListDrawable and RotateDrawable . Using this indirection, you can use vector drawings in cases such as the TextView s android:drawableLeft , which normally cannot support vector drawings.
This leads to the following steps:
Step 1:
Create or import the vector resource that you need for the application. For example, you can create a vector that ic_action_search_vector.xml search icon and name it ic_action_search_vector.xml
Step 2:
Create another resource that can be used for the proxy server for the previously created vector. Let's say for the previous ic_action_search_vector.xml , ic_action_search.xml can be created as a simple StateListDrawable , which can contain the following lines:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/ic_action_search_vector"/> </selector>
You can skip this step if you specified a vector that can be extracted from another resource that you will use with your view.
Step 3:
Use a resource that can be pulled out (here, ic_action_search.xml ), which refers to a vector drawable ( ic_action_search_vector.xml ) instead of directly converting a vector. For the menu, it will look like this:
<item android:id="@+id/search" android:title="@string/search" android:icon="@drawable/ic_action_search" app:showAsAction="always"/>
This is the solution to this problem!