user1423447
user1423447

Reputation: 53

How to add Twitter4j to Android project

At the moment,I downloaded file twitter4j-android-2.2.5.rar and extracted it..But have many folder and I don't know add which folder and how to add.

Upvotes: 1

Views: 4281

Answers (5)

Abhay Maniyar
Abhay Maniyar

Reputation: 129

Just add compile 'org.twitter4j:twitter4j-core:4.0.2' to your /app/build.gradle dependencies.

Upvotes: 0

dixhom
dixhom

Reputation: 3035

If you are using Android Studio,

  1. Put the twitter4j-core-4.0.1.jar file into the libs folder. (You should see it if you click the 1:Project tab on the left. It is in <Your Project> > app > libs.)
  2. Right click it and click 'Add as library'

Make sure compile files('libs/gson-2.2.4.jar') is in the build.gradle file.

Upvotes: 0

mmmdearte
mmmdearte

Reputation: 109

I have downloaded twitter4j-4.0.2 and the jar file twitter4j-core-4.0.2 is in the lib folder not libs.

twitter4j-4.0.2/lib/twitter-core-4.0.2.jar

Upvotes: 0

P Srinivas Goud
P Srinivas Goud

Reputation: 896

Create libs folder and keep your jar file in this folder.Right click on jar choose Build path -> Add to build path.. that's all you need to do.

Upvotes: 2

Christine
Christine

Reputation: 5575

You should add the twitter4j jar file that's in the rar archive to your classpath. If you use Eclipse, it's in project/properties/java build path/libraries, or you can just put it in the libs folder in your project.

Upvotes: 1

Related Questions