Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 复选框的选择器xml适用于KitKat,但不适用于JB_Android_Android Layout - Fatal编程技术网

Android 复选框的选择器xml适用于KitKat,但不适用于JB

Android 复选框的选择器xml适用于KitKat,但不适用于JB,android,android-layout,Android,Android Layout,我是android的新手,尝试改变checkbox的外观和感觉。我使用了android sdk\platforms\android-\data\res\drawable中的选择器xml(btn_check.xml)。这是一个剪子- 在活动xml中,我使用以下方法- <...> <CheckBox android:id="@+id/checkBox1" android:layout_width="200dp" android:layout_heig

我是android的新手,尝试改变checkbox的外观和感觉。我使用了android sdk\platforms\android-\data\res\drawable中的选择器xml(btn_check.xml)。这是一个剪子-


在活动xml中,我使用以下方法-

<...>
<CheckBox
    android:id="@+id/checkBox1"
    android:layout_width="200dp"
    android:layout_height="50dp"
    android:button="@drawable/btn_check"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="126dp"
    android:text="CheckBox" />

问题是,这段代码在kitkat的emulator上工作,因为它只是崩溃了——表示在JellyBean上找不到资源。logcat提到未找到“btn_检查”资源。btn_check.xml与其他png文件一起位于drawable文件夹中

从昨天下午开始,我就一直在试着让它在JellyBean上运行,但是运气不好!!任何帮助都将不胜感激


想知道如何针对这种平台差异投保

忘了提到模拟器是Api 16的。谢谢。请尝试清理您的项目。已清理多次。还卸载了仿真器上的pervious副本。检查apk文件是否包含xml。但还是没有运气!!
<...>
<CheckBox
    android:id="@+id/checkBox1"
    android:layout_width="200dp"
    android:layout_height="50dp"
    android:button="@drawable/btn_check"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="126dp"
    android:text="CheckBox" />