选择checkbox时,会出现如图所示,invalid drawable tag vector(无效的可绘制标记向量),无法解析xml文件
但是当我选择API21(包括以上的)则不出现该错误,这是为什么呢?求大神~能解决的话,感激不尽~
布局文件代码如下(请忽略排版,只是试一下checkbox控件~):
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:text="test"
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn1"
/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="保存用户名和密码"
android:id="@+id/cb_check"
android:onClick="true"
android:layout_toRightOf="@+id/btn1"
/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/btn1"
android:hint="输入用户名"
android:id="@+id/et1"/>
</RelativeLayout>