我需要幫助...我買了我的Android XML錯誤...下面的代碼:的Android ::設置佈局
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference
android:key="music"
android:title="Music"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:summary="Play Music for each screen"
android:defaultValue="true" />
<CheckBoxPreference
android:key="hints"
android:title="Hints"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:summary="Enable hints during gameplay"
android:defaultValue="true" />
</PreferenceScreen>
以下是錯誤消息:
com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup
You must supply a layout_width attribute.
You must supply a layout_height attribute.
謝謝提前..
這是什麼代碼? com.android.layoutlib.bridge.MockView – MAC 2012-04-06 14:30:58
「com.android.layoutlib.bridge.MockView無法轉換爲android.view.ViewGroup」是錯誤消息。我的xml代碼出現問題.. – user1271277 2012-04-06 14:40:12
@ user1271277:發佈您的MockView佈局 – 2012-04-06 15:07:21