我有一個簡單的preferences.xml:PreferenceScreen類未找到
<?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,使用日食靛藍。 在包資源管理器中有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)
我該怎麼辦? Thanx提前
** res **中的哪個文件夾是否放置了您的* preferences.xml *文件? – waqaslam 2012-07-18 11:07:09
[PreferenceScreen class not found]可能的重複(http://stackoverflow.com/questions/6025349/preferencescreen-class-not-found) – 2016-05-27 12:12:55