Bug 49294 - Java.Lang.IllegalStateException This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.
Summary: Java.Lang.IllegalStateException This app has been built with an incorrect con...
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-12-08 10:37 UTC by Mark Silver
Modified: 2017-08-23 21:13 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mark Silver 2016-12-08 10:37:31 UTC
Exception relating to configuration for vector support library. Looks like it's a setting in Gradle 2.0+ not sure how to resolve it in Xamarin.

The first exception will say that "abc_vector_test.xml" is missing.

If you add an empty file with that name then you will get the following error message.

"This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat."

Xamarin.Android - v7.1.0.13
SDK Tools Version: 25.2.3
SDK Platform Tools Version: 25.0.1
SDK Build Tools Version: 25.0.1

Xamarin Studio Community - Version 6.2 (build 1499)

I'm using the pre release Xamarin Android Support libraries also. 

    "Xamarin.Android.Support.v4": "25.0.1-rc1",
    "Xamarin.Android.Support.v7.AppCompat": "25.0.1-rc1",

To reproduce the error it's as simple as creating a new empty Xamarin.Android project. Change the Main activity to AppCompatActivity. Then run the app on a device < 21.

The exception will trigger in activity OnCreate, on the base parent call.
Comment 1 Alek Slater 2017-06-12 12:38:33 UTC
I'm seeing the same thing here, did you ever manage to work around it ?
Comment 2 Alek Slater 2017-06-13 15:59:43 UTC
I think the explanation here speaks for itself, its easily reproducable. Its not directly an android issue either, because I've a test project to test UI that's in java, and the errors don't occur there. I've tried everything from Android.Support.V7.App.AppCompatDelegate.CompatVectorFromResourcesEnabled = true; , changing ImageViews to android.support.v7.widget.AppCompatImageView , no luck. The crash occurs, even before it manages to load any UI (so before SetContentView in an activity).
Comment 3 Alek Slater 2017-07-04 09:34:53 UTC
This is still a pretty big obstacle to us, and we've found no way to work around it.
Comment 4 Kent Green [MSFT] 2017-07-06 22:13:14 UTC
Thank you for taking the time to submit the bug. We are unable to reproduce this issue. Please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue.  

Here is my test run where I attempted to reproduce the issue in a new Android app set to use AppCompatActivity per the bug description; all 8 devices with a range of Android versions from 4.4.4 - 6.0.1 passed without reproducing the bug:
Comment 5 Cody Beyer (MSFT) 2017-08-23 21:13:12 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!