1

我正在尝试构建一个包含 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)
4

0 回答 0