0

I have an android application where I'm making use of twitter4j jar file. The problem is that if I search for twitter4j I get a number of jar files. I don't exactly know which is the jar file to be included. Could you guys help me identify it? Also, if you have a link to the jar file kindly post it.

Thanks.

Mat
  • 202,337
  • 40
  • 393
  • 406
Sudhir R
  • 67
  • 1
  • 7

2 Answers2

1

Did you try looking at its documentation ?


Taking a look at the homepage of its website, I see (quoting) :

How To Use
Just add twitter4j-core-2.2.3.jar to your application classpath

And there is a download section just below...


After that, you'll probably want to take a look at :

Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663
  • Thanks for the reply. But, it didn't quite help me. When i use import twitter4j.Twitter; it gives me an error on that line with the suggestion of "create class Twitter in the package twitter4j" I suppose the Twitter class is declared in some other jar file. I'm not able to identify the right one. – Sudhir R Jul 24 '11 at 10:42
  • I can also see that there is a Twitter.java file in the twitter4j-core folder. That means that the Twitter class should be there in the above mentioned package. I just don't know what I'm missing – Sudhir R Jul 24 '11 at 10:50
0

Did you add this jar file to your referenced libraries in your project properly? Assuming you are using eclipse, right click on the project, got to build path and add as external library this jar file. You may also need two other jar files for twitter such as signpost.

http://code.google.com/p/oauth-signpost/downloads/detail?name=signpost-core-1.2.1.1.jar

http://code.google.com/p/oauth-signpost/downloads/detail?name=signpost-commonshttp4-1.2.1.1.jar&can=2&q=

JustCurious
  • 1,848
  • 3
  • 30
  • 57
  • Yes, I am using eclipse and yes, I'd done the above mentioned things. I found out a clue. When it came to twitter4j.....jar file I'd included the ones for java in general and not for android. Then I got a twitter4j jar file specific to android called twitter4j-android-2.2.3. After I did this, half of the errors were gone as the right library was in place. But, there is problem with httpclient-4.0.1.jar file. There should be a httpclient file exclusively for android. I did a lot of searching and could not find anything. – Sudhir R Jul 24 '11 at 12:51
  • I am not sure what this is about but sometimes if you get a lot of errors that you are not sure where they come from you may just need to refresh your project or clean it – JustCurious Jul 27 '11 at 13:20