这是我的图层列表drawable,我用它作为按钮的背景。它适用于android 6(API 23)但在Android 4.4(API 19)上崩溃。如何修复我的drawable,使其适用于从API 15开始的所有API?
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@android:color/white" />
</item>
<item android:drawable="?android:attr/selectableItemBackground"></item>
</layer-list>
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #6: <item> tag requires a 'drawable' attribute or child tag defining a drawable
at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:164)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:990)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:930)