{"action":"created","issue":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/2315","repository_url":"https://api.github.com/repos/robolectric/robolectric","labels_url":"https://api.github.com/repos/robolectric/robolectric/issues/2315/labels{/name}","comments_url":"https://api.github.com/repos/robolectric/robolectric/issues/2315/comments","events_url":"https://api.github.com/repos/robolectric/robolectric/issues/2315/events","html_url":"https://github.com/robolectric/robolectric/issues/2315","id":136297828,"number":2315,"title":"Robolectric crashes with new VectorDrawableCompat","user":{"login":"hzsweers","id":1361086,"avatar_url":"https://avatars.githubusercontent.com/u/1361086?v=3","gravatar_id":"","url":"https://api.github.com/users/hzsweers","html_url":"https://github.com/hzsweers","followers_url":"https://api.github.com/users/hzsweers/followers","following_url":"https://api.github.com/users/hzsweers/following{/other_user}","gists_url":"https://api.github.com/users/hzsweers/gists{/gist_id}","starred_url":"https://api.github.com/users/hzsweers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzsweers/subscriptions","organizations_url":"https://api.github.com/users/hzsweers/orgs","repos_url":"https://api.github.com/users/hzsweers/repos","events_url":"https://api.github.com/users/hzsweers/events{/privacy}","received_events_url":"https://api.github.com/users/hzsweers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2016-02-25T06:42:46Z","updated_at":"2016-03-22T18:05:55Z","closed_at":null,"body":"When AppCompat tries to create a drawable from a given vector, Robolectric tests fail with the following exception:\r\n\r\n```\r\nCaused by: org.xmlpull.v1.XmlPullParserException: XML file build/intermediates/res/merged/world/debug/drawable-anydpi-v21/abc_ic_ab_back_material.xml line #-1 (sorry, not yet implemented): invalid drawable tag vector\r\n\tat android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:897)\r\n\tat android.graphics.drawable.Drawable.createFromXml(Drawable.java:837)\r\n\tat android.content.res.Resources.loadDrawable(Resources.java:2087)\r\n\t... 57 more\r\n```\r\n\r\nHappens regardless of whether or not support vectors are enabled as specified here: http://android-developers.blogspot.com/2016/02/android-support-library-232.html\r\n\r\n```groovy\r\n// Gradle Plugin 2.0+  \r\n android {  \r\n   defaultConfig {  \r\n     vectorDrawables.useSupportLibrary = true  \r\n    }  \r\n }  \r\n```\r\n\r\nRelevant exception higher up:\r\n```\r\nCaused by: android.content.res.Resources$NotFoundException: File build/intermediates/res/merged/world/debug/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020016\r\n\tat android.content.res.Resources.loadDrawable(Resources.java:2091)\r\n\tat org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:195)\r\n\tat org.robolectric.internal.Shadow.directlyOn(Shadow.java:57)\r\n\tat org.robolectric.shadows.ShadowResources.loadDrawable(ShadowResources.java:518)\r\n\tat android.content.res.Resources.loadDrawable(Resources.java)\r\n\tat android.content.res.Resources.getDrawable(Resources.java:695)\r\n\tat android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:323)\r\n\tat android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:180)\r\n\tat android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173)\r\n\tat android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60)\r\n\tat android.support.v7.widget.Toolbar.__constructor__(Toolbar.java:254)\r\n\tat android.support.v7.widget.Toolbar.<init>(Toolbar.java)\r\n\tat android.view.LayoutInflater.createView(LayoutInflater.java:594)\r\n\tat android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)\r\n\tat android.view.LayoutInflater.rInflate(LayoutInflater.java:755)\r\n\tat android.view.LayoutInflater.rInflate(LayoutInflater.java:758)\r\n\tat android.view.LayoutInflater.inflate(LayoutInflater.java:492)\r\n\tat uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60)\r\n\tat android.view.LayoutInflater.inflate(LayoutInflater.java:397)\r\n\tat android.view.LayoutInflater.inflate(LayoutInflater.java:353)\r\n\tat android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:379)\r\n\tat android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:300)\r\n\tat android.support.v7.app.AppCompatDelegateImplV7.initWindowDecorActionBar(AppCompatDelegateImplV7.java:169)\r\n\tat android.support.v7.app.AppCompatDelegateImplBase.getSupportActionBar(AppCompatDelegateImplBase.java:88)\r\n\tat android.support.v7.app.AppCompatActivity.getSupportActionBar(AppCompatActivity.java:99)\r\n```\r\n\r\nAppCompat does some working around for vector drawables via its `ResourcesWrapper` and `ContextWrapper` classes, I think the solution for this is that Robolectric needs to work with this. See the bottom of https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88#.hq4q2olt3"},"comment":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/comments/199943051","html_url":"https://github.com/robolectric/robolectric/issues/2315#issuecomment-199943051","issue_url":"https://api.github.com/repos/robolectric/robolectric/issues/2315","id":199943051,"user":{"login":"hzsweers","id":1361086,"avatar_url":"https://avatars.githubusercontent.com/u/1361086?v=3","gravatar_id":"","url":"https://api.github.com/users/hzsweers","html_url":"https://github.com/hzsweers","followers_url":"https://api.github.com/users/hzsweers/followers","following_url":"https://api.github.com/users/hzsweers/following{/other_user}","gists_url":"https://api.github.com/users/hzsweers/gists{/gist_id}","starred_url":"https://api.github.com/users/hzsweers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzsweers/subscriptions","organizations_url":"https://api.github.com/users/hzsweers/orgs","repos_url":"https://api.github.com/users/hzsweers/repos","events_url":"https://api.github.com/users/hzsweers/events{/privacy}","received_events_url":"https://api.github.com/users/hzsweers/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T18:05:55Z","updated_at":"2016-03-22T18:05:55Z","body":"@jaredsburrows I don't see either used in that project, could you maybe link me a specific file?"}}