错误膨胀 class com.origamilabs.library.views.StaggeredGridView

Error inflating class com.origamilabs.library.views.StaggeredGridView

我正在尝试在我的项目中使用 StaggeredGridView 和 ActionBarSherlock.But 我在尝试将 main_screen.xml 膨胀到 main.xml 时遇到此错误。

View view = inflater.inflate(R.layout.main_screen, container, false);

我在启动我的应用程序时遇到这些日志错误:

Could not find class 'android.support.v4.util.SparseArrayCompat', referenced from method com.origamilabs.library.views.StaggeredGridView
 E/AndroidRuntime(18115): FATAL EXCEPTION: main
E/ndroidRuntime(18115): android.view.InflateException: Binary XML file line #8: Error inflating class com.origamilabs.library.views.StaggeredGridView
03-05 12:28:17.565: E/AndroidRuntime(18115):    at android.view.LayoutInflater.createView(LayoutInflater.java:626)
03-05 12:28:17.565: E/AndroidRuntime(18115):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
03-05 13:32:06.160: E/AndroidRuntime(22619):    at com.deu.sharepic.MainScreenActivity.onCreateView MainScreenActivity.java:84)

还有我的 main_screen.xml ;

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:staggered="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >

 <com.origamilabs.library.views.StaggeredGridView
android:id="@+id/chatList"
staggered:numColumns="2"
staggered:drawSelectorOnTop="true"
android:layout_width="match_parent"
android:layout_height="wrap_content" /> 

</RelativeLayout>

和main.xml:

<android.support.v4.view.ViewPager
 xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
 android:layout_height="match_parent" />

我更改了所有 andoid_support_v4.jar,将所有参考项目与示例项目 v4.jar 一起使用。比删除 staggeredgridview.jar 并添加为库 project.Than 修复。

谢谢大家