Should we use SVG and VectorDrawable in the Andorid app ?

Then, the answer is yes.

Vector drawables allow us to replace multiple png assets with a single vector graphic, defined in XML. While previously limited to Lollipop and higher devices.

Which means:

No Multiple PNG’s based on densities.

Application Size reduction: Less Assets less memory consumption.

SVG are lighter than multiple PNG’s used in an application. They are even lighter than a single PNGs.


How to tell AAPT that we are using <vector> for Pre-lollipop versions.

For v2.0 or above of the Gradle plugin: we have to add the following in the module level

However to technical bug described below:

First up, this functionality was originally released in 23.2.0, but then we found some memory usage and Configuration updating issues so we it removed in 23.3.0. In 23.4.0 (technically a fix release) we’ve re-added the same functionality but behind a flag which you need to manually enable. – ANDROID TEAM

So in order to enable the configuration, we need to add the following in each activity where we are using Vector images or in the Application class of the project.


How to use SVG image ?

We can convert the SVG image into <vector> using Asset Studio.

Here are the steps for converting SVG into Vector Drawable Compat.




We can also use online open source tools for conversion:


For setting Vector Image: 

The line android:src=”@drawable/ic_wishlist_checked”  will give the warning as we need to use

For changing programmatically:

instead of

So guys



. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


It was a successful collaboration. The Mobikul team provided the client everything they needed in a timely and high-quality manner. They were very professional, reliable, and accessible during the entire process. The client also saw no room for any improvements in the vendor's performance.

Vincenzo Carrano

Vincenzo Carrano

Administrator, Segshop

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home