小编Maz*_*azZ的帖子

无法在图形布局中打开XML文件:FakeAdapter无法强制转换为BaseAdapter

我在eclipse中的android项目遇到了一些问题.

我有两个XML布局文件,都包含ListViews.

ListViews在我的Android手机上完美运行,但是eclipse不会打开设计窗口,给出以下错误:

com.android.layoutlib.bridge.impl.binding.FakeAdapter cannot be cast to android.widget.BaseAdapter
Run Code Online (Sandbox Code Playgroud)

这两个文件都包含以下代码:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<ListView
    android:id="@+id/cardList"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:fadeScrollbars="true"
    android:fastScrollAlwaysVisible="true"
    android:fastScrollEnabled="true"
    android:scrollbarSize="30dp"
    android:scrollbarStyle="insideOverlay" >
</ListView>

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

有什么建议?

java eclipse android

4
推荐指数
1
解决办法
1625
查看次数

标签 统计

android ×1

eclipse ×1

java ×1