2012-04-22 41 views
0

我試圖建立一個佈局列表層繪製安卓:月食圖形佈局視圖可以看到層列表

這是我的代碼:

<?xml version="1.0" encoding="utf-8"?> 
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" > 

<item 
    android:drawable="@drawable/sign" 
    android:id="@+id/sign"/> 
</layer-list> 

這是圖形中的錯誤佈局:

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: 
- item (Fix Build Path, Edit XML) 
- layer-list (Fix Build Path, Edit XML) 

有人請嗎?

回答

0

我把它粘貼到當前項目中的一個新文件中,保存並重建,沒有小故障。 您是否清理過您的項目並嘗試重建?

+0

正如我所說我想看看eclopse xml圖形佈局選項卡上的佈局。預覽。這是我犯錯的地方。你能在那裏看到嗎? – 2012-04-22 13:09:17