android eclipse无法在Graphical Layout中看到layer-list

时间:2012-05-22 14:54:13

标签: android xml

我正在尝试构建一个包含2个图像的图层列表,并在eclipse中的图形布局中查看它,以便看到它正确... 由于某种原因,我得到一个错误

这是我的xml文件:

<?xml version="1.0" encoding="utf-8"?>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="50dp"
android:layout_height="50dp">

<item android:drawable="@drawable/picuser" 
android:layout_width="50dp"
android:layout_height="50dp"/>

<item android:drawable="@drawable/ic_launcher" 
android:layout_width="50dp"
android:layout_height="50dp"/>

</layer-list>

这是我的错误:

NOTE: This project contains Java compilation errors, which can cause rendering failures  
for custom views. Fix compilation problems first.

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 个答案:

没有答案
相关问题