我有一个简单的preferences.xml:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<PreferenceCategory
android:title="First Category">
<CheckBoxPreference
....
我的 android 版本是 2.1 (API7) java 是 1.6,使用 eclipse indigo。在包资源管理器中有android.jar,打开后有android.preference包。
即便如此我得到以下错误:
com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- PreferenceCategory (Fix Build Path, Edit XML)
- PreferenceScreen (Fix Build Path, Edit XML)
我该怎么办?提前感谢