You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error when inflating a Fragment that contains a view with a layer-list drawable background:
Caused by: org.xmlpull.v1.XmlPullParserException: XML file /Users/nwolf/dev/main/app/../app/build/intermediates/data-binding-layout-out/dev/debug/drawable-v21/list_item_selector.xml line #-1 (sorry, not yet implemented): tag requires a 'drawable' attribute or child tag defining a drawable
Steps to Reproduce
Inflate fragment with View that include a background list_item_selector.xml:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<selector>
<!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. -->
<item android:drawable="@color/station_list_item_selected" android:state_pressed="false"
android:state_selected="true"/>
<item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@color/station_list_item_focused" />
<item android:drawable="@color/station_list_item_disabled" android:state_enabled="false"
android:state_focused="true"/>
<item android:drawable="@color/station_list_item_selected_pressed"
android:state_pressed="true"
android:state_selected="true"/>
<item android:drawable="@color/station_list_item_pressed" android:state_focused="true"
android:state_pressed="true"/>
<item android:drawable="@color/station_list_item_pressed" android:state_focused="false"
android:state_pressed="true"/>
<item android:drawable="@color/station_list_item_focused" android:state_focused="true"/>
<item android:drawable="@color/transparent"/>
</selector>
</item>
<item android:drawable="?android:attr/selectableItemBackground" />
</layer-list>
Robolectric & Android Version
robolectic 3.1.2 - targeting SDK 21
The text was updated successfully, but these errors were encountered:
We've revamped resources in Robolectric 4.0 to process the binary resource files + arsc table produced by aapt and the resource handling code is now much closer to that of the framework. This includes changes to parse the merged manifest using the Android platform code.
Mind giving this a try with 4.0 + binary resources by configuring your gradle.build as follows:-
Description
I get the following error when inflating a Fragment that contains a view with a layer-list drawable background:
Caused by: org.xmlpull.v1.XmlPullParserException: XML file /Users/nwolf/dev/main/app/../app/build/intermediates/data-binding-layout-out/dev/debug/drawable-v21/list_item_selector.xml line #-1 (sorry, not yet implemented): tag requires a 'drawable' attribute or child tag defining a drawable
Steps to Reproduce
Inflate fragment with View that include a background list_item_selector.xml:
Robolectric & Android Version
robolectic 3.1.2 - targeting SDK 21
The text was updated successfully, but these errors were encountered: