app:srcCompat
中和StateListDrawable
内使用向量可绘制对象,以便在TextView中使用android:drawableLeft
。自从升级到AppCompat 23.3.0版本后,只有
app:srcCompat
中的向量可绘制对象可以工作。每当我以另一种方式引用它时,就会出现问题。FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my.package.name/.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class Button
...
Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class Button
...
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #14: invalid drawable tag vector
at android.graphics.d
是什么导致了我的支持向量可绘制对象在某些情况下失败?