与PullTorefresh listview冲突

时间:2013-12-03 23:13:54

标签: android listview android-holo-everywhere pull-to-refresh

我在我的应用上学习holoeverywhere库(https://github.com/Prototik/HoloEverywhere),但在与PullToRefresh库(https://github.com/johannilsson/android-pulltorefresh)结合使用时遇到问题,如何解决?

问题 无法启动活动ComponentInfo {com.droidersuin.project / com.droidersuin.project.app.ContentActivity}:java.lang.ClassCastException:com.markupartist.android.widget.PullToRefreshListView无法强制转换为org.holoeverywhere.widget .ListView

这个logcat

    12-04 06:01:14.141: E/AndroidRuntime(5073): FATAL EXCEPTION: main
12-04 06:01:14.141: E/AndroidRuntime(5073): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.droidersuin.project/com.droidersuin.project.app.Tab_Android}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.droidersuin.project/com.droidersuin.project.app.ContentActivity}: java.lang.ClassCastException: com.markupartist.android.widget.PullToRefreshListView cannot be cast to org.holoeverywhere.widget.ListView
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2067)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread.access$600(ActivityThread.java:133)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.os.Looper.loop(Looper.java:137)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread.main(ActivityThread.java:4794)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at java.lang.reflect.Method.invokeNative(Native Method)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at java.lang.reflect.Method.invoke(Method.java:511)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at dalvik.system.NativeStart.main(Native Method)
12-04 06:01:14.141: E/AndroidRuntime(5073): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.droidersuin.project/com.droidersuin.project.app.ContentActivity}: java.lang.ClassCastException: com.markupartist.android.widget.PullToRefreshListView cannot be cast to org.holoeverywhere.widget.ListView
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2067)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1908)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:694)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.widget.TabHost.setCurrentTab(TabHost.java:358)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.widget.TabHost.addTab(TabHost.java:236)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at com.droidersuin.project.app.Tab_Android.onCreate(Tab_Android.java:173)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.Activity.performCreate(Activity.java:5008)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
12-04 06:01:14.141: E/AndroidRuntime(5073):     ... 11 more
12-04 06:01:14.141: E/AndroidRuntime(5073): Caused by: java.lang.ClassCastException: com.markupartist.android.widget.PullToRefreshListView cannot be cast to org.holoeverywhere.widget.ListView
12-04 06:01:14.141: E/AndroidRuntime(5073):     at org.holoeverywhere.app.ListActivity.onSupportContentChanged(ListActivity.java:68)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.support.v4.app._HoloActivity.setContentView(_HoloActivity.java:405)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at com.droidersuin.project.app.ContentActivity.onCreate(ContentActivity.java:170)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.Activity.performCreate(Activity.java:5008)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-04 06:01:14.141: E/AndroidRuntime(5073):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
12-04 06:01:14.141: E/AndroidRuntime(5073):     ... 21 more

0 个答案:

没有答案