Android unable to load class error

556 Views Asked by At

I am trying to implement pull-to-refresh using github example https://github.com/chrisbanes/Android-PullToRefresh but when i am tring to implement the list view its giving me unable to load class master\library\src\com\handmark\pulltorefresh\library\pullToRefreshListView

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

I ran sample project which is using this library its working the screen shot of it is:

enter image description here

But when i am trying to implement this class to my project its giving class not found exception i have made one libs folder and put library.jar file in there and added it to build path but still on run time its throwing this error.

enter image description here

in my xml file i have put

<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

There are 2 best solutions below

0
On BEST ANSWER

Finally got the solution of it

in place of adding jar files in lib and adding it to build path we have to put library project as dependent project

You have to add project here

RightClick:==> properties ==> Android ==>> Library (Add)

enter image description here

0
On

did you link the libs correctly?please check your IDE or your project.properties.