我收到了这个错误:
Exception raised during rendering: 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:
- android.support.v4.widget.SwipeRefreshLayout (Fix Build Path, Edit XML, Create Class)
我的XML代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView android:id="@+id/news_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
我已经重新启动了eclipse,但这并没有解决错误。
答案 0 :(得分:0)
我已经通过将支持库中的SwipeRefreshLayout复制到我的包来解决了这个错误。