我在eclipse中遇到了一些與我的android項目有關的問題。無法在圖形佈局中打開XML文件:FakeAdapter無法轉換爲BaseAdapter
我有兩個XML佈局文件,都包含ListViews。
的列表視圖是我的Android手機上可以正常使用,但日食不會打開設計窗口,給了以下錯誤:
com.android.layoutlib.bridge.impl.binding.FakeAdapter cannot be cast to android.widget.BaseAdapter
這兩個文件包含以下代碼:
<?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>
任何建議?
這似乎是Eclipse的ADT插件中的一個錯誤。確保您使用的是當前版本的ADT和SDK開發人員工具。 – CommonsWare 2012-04-12 13:15:25
刪除'android:fastScrollEnabled =「true」'和'android:fastScrollEnabled =「true」' – 2013-10-18 05:57:20