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)

请问有人吗?

4

1 回答 1

0

我将它粘贴到我当前项目的一个新文件中,保存并重建没有故障。您是否清理过项目并尝试重建?

于 2012-04-22T10:21:34.737 回答