1

I am trying to get this code working: http://quickblox.com/developers/Android_XMPP_Chat_Sample Even though the library is present in the project folder. I have already tried to clean and build the project but that does not work. No jar is provided by Quickblox in the sample. It is just present in the folder.
Both these cannot be resolved:

import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshListView;

enter image description here

Sahil Sareen
  • 1,813
  • 3
  • 25
  • 40
  • Have you tried including the folder in the build path? – JajaDrinker Apr 04 '14 at 16:45
  • @JajaDrinker I had not done that.. After doing it this way: Properties->Source->Add Folder.. I got errors in those files(in the included folder): The declared package "com.handmark.pulltorefresh.library" does not match the expected package "" – Sahil Sareen Apr 04 '14 at 16:49

2 Answers2

2

Those step's are required : (Jar file should be included!) From http://quickblox.com/developers/Android_XMPP_Chat_Sample#Eclipse_IDE

Import “appcompat” lib project from /extras/android/support/v7

Configure appcompat and pull-to-refresh: Project->Properties->Android:

  • set Project Build Target 4.4.2
  • check “Is Library” should be set

Configure sample. Project->Properties->Android:

  • add pull-to-refresh and appcompat
  • set Project Build Target 4.4.2

Project->Properties->Java Build Path->Libraries, “Add External JARs…” /jar/quickblox-android-1.0.1.jar

Go to Order&Export tab and check quickblox-android-1.0.1.jar

Clean and rebuild project

JajaDrinker
  • 652
  • 6
  • 15
2

The PullToRefresh library is a Library Project. These Library Projects need to be imported projects into the workspace, and then your app must identify the project as a library to reference it.

Here's the instructions from the quickblox website on how to do this.

Here is another post explaining how to import these projects into your workspace: How to add a Library Project to a android project?

Community
  • 1
  • 1
quinnjn
  • 623
  • 7
  • 10
  • So should I remove the libraries folder then? It has only com handmark stuff in it. – Sahil Sareen Apr 04 '14 at 17:06
  • No, if the library project was bundled with the quickblox sample app then it is assumed the quickblox sample app relies on it. Import the PullToRefresh project by following this comment http://stackoverflow.com/a/8281477/1473536 – quinnjn Apr 04 '14 at 17:09