2013-12-11 67 views
0

我想實現拉到刷新使用github示例https://github.com/chrisbanes/Android-PullToRefresh,但是當我要實現列表視圖它給我無法加載類主\庫\ src \ com \ handmark \ pulltorefresh \庫\ pullToRefreshListViewAndroid無法加載類錯誤

I have imported library project into system and also placed the jar file. 

我跑這是使用這個庫示例項目的工作它的屏幕截圖是:

enter image description here

但是,當我想實現這個類到m y項目給它的類沒有發現異常我已經做了一個libs文件夾,並把library.jar文件在那裏,並添加到構建路徑,但仍然在運行時拋出這個錯誤。

enter image description here

在我的xml文件

我已經把

<com.handmark.pulltorefresh.library.PullToRefreshListView 
    android:id="@+id/listView1" 
    android:divider="#E4E4E4" 
    android:dividerHeight="2dp" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:cacheColorHint="#00000000" 
    android:fadingEdge="none" 
    android:fastScrollEnabled="false" 
    android:footerDividersEnabled="false" 
    android:headerDividersEnabled="false" 
    android:smoothScrollbar="true" /> 

+2

某處有問題,要麼你怎麼樣了導入它或如何使用它。你可以在你使用它的地方發佈一些代碼,並描述你如何將它導入到你的項目中? – Jules

+0

嘗試單擊 Raj

回答

1

最終找到了它

的解決方案到位lib中添加jar文件並將其添加到構建路徑,我們必須把庫項目作爲相關項目的

您必須添加的項目在這裏

右擊:==>屬性==> Android的== >>庫(添加)

enter image description here

0

您是否正確鏈接庫?請檢查您的IDE或您的project.properties。

+0

謝謝,我得到了解決方案 –

相關問題