【发布时间】:2015-04-01 23:25:01
【问题描述】:
这是我的preferences.xml文件的代码:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent">
<CheckBoxPreference
android:key = "test"
android:title = "Test"
android:summary = "Yes It WORKED"
android:defaultValue="true"
/>
</PreferenceScreen>
android studios 渲染器给我以下错误信息:
The following classes could not be found:
-CheckBoxPreference(Fix build path)
-PreferenceScreen(Fix build path)
当我没有输入时它也给了我错误:
android:layout_height="match_parent"
android:layout_width="match_parent">
尽管 Google 本身 (http://developer.android.com/guide/topics/ui/settings.html) 对此一言不发。 (他们在运行代码时会显示一个操作栏,我得到的只是屏幕顶部的复选框首选项)
【问题讨论】:
标签: android xml android-studio rendering