SwipeRefreshLayout com.android.layoutlib.bridge.MockView无法强制转换为android.view.ViewGroup

SwipeRefreshLayout com.android.layoutlib.bridge.MockView无法强制转换为android.view.ViewGroup,android,xml,swiperefreshlayout,Android,Xml,Swiperefreshlayout,我收到了这个错误: 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.suppo

我收到了这个错误:

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,但这并没有解决错误。

我已经通过将SwipeRefreshLayout从支持库复制到我的软件包中解决了这个错误。

请发布logcat输出。@GauravArora它发生在eclipse中,而不是在运行时。非常适合我,我使用的是Luna Release(4.4.0)。也许是时候升级了。@GauravArora您能描述一下“升级”是什么意思吗?您使用的是什么版本的Eclipse?