Coding⏱️ 4 min read📅 2026-06-04

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

Android Support Library update error fix

Quick Answer: The issue is caused by a change in the VectorDrawableCompat class. Update to version 23.0.1 or later, which includes a fix for this bug.

The error 'XmlPullParserException Binary XML file line #17 tag requires viewportWidth > 0' occurs when updating to Android SupportLibrary version 23.2.0. This issue affects users who have not properly configured their vector drawable assets in their project.

This error can be frustrating, especially for developers who are already dealing with other issues in their application. However, by following the steps outlined in this guide, you should be able to resolve the problem and get your app up and running smoothly.

💡 Why You Are Getting This Error

  • The primary cause of this error is that the vector drawable assets in the project have not been properly configured with a viewportWidth. This can happen when importing vector drawables from other projects or assets, or when using third-party libraries that do not properly set the viewportWidth.
  • An alternative reason for this error could be that the Android Support Library version 23.2.0 has changed the way it handles vector drawable assets, and some older projects may not be compatible with this new version.

🔧 Proven Troubleshooting Steps

Fixing the Error by Configuring Vector Drawables

  1. Step 1: Step 1: Open your project's build.gradle file and add the following configuration to the vector drawable assets block: android:viewportWidth="0"
  2. Step 2: Step 2: Go to your project's res/drawable folder and find the vector drawables that are causing the error. Right-click on each of these drawables and select 'Edit' or 'Open in Android Studio'.
  3. Step 3: Step 3: In the 'Edit Vector Drawable' dialog, set the 'viewportWidth' property to a non-zero value (e.g., 1). This will ensure that the vector drawable assets are properly configured for use with the Android Support Library version 23.2.0.

Alternative Fix Method: Downgrade to Previous Version of Android Support Library

  1. Step 1: Step 1: Open your project's build.gradle file and add the following line at the bottom: implementation 'com.android.support:support-v4:23.1.0'
  2. Step 2: Step 2: Go to your project's res/drawable folder and find the vector drawables that are causing the error. Right-click on each of these drawables and select 'Edit' or 'Open in Android Studio'.
  3. Step 3: Step 3: In the 'Edit Vector Drawable' dialog, set the 'viewportWidth' property to a non-zero value (e.g., 1). This will ensure that the vector drawable assets are properly configured for use with the previous version of the Android Support Library.

🎯 Final Words

By following one of these methods, you should be able to resolve the 'XmlPullParserException Binary XML file line #17 tag requires viewportWidth > 0' error and get your app up and running smoothly. If you are still experiencing issues, it may be helpful to consult the Android Support Library documentation or seek further assistance from a developer community.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions