I'm trying to use the twitter4j
library. And I saw on their website that you can use Maven to integrate it.
So In my gradle.build file I did
buildscript {
repositories {
mavenCentral()
jcenter()
}
and compile:
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
compile 'org.twitter4j:twitter4j-core:4.0.3'
}
}
This doesn't seem to do the trick. I can't use any of the classes from twitter4j
even after cleaning and refreshing everything. What I'm concerned about is that I downloaded the twitter4j-4.0.3.zip
and extracted it , but I never placed the folder or it's content anywhere? Feels like i'm missing something?
I faced this kind of issue few weeks back when i try to utilize Twitter4j
library through Gradle.
What i did was,
Twitter4J
zip file from their site.lib
folder. Open it..lib
files like twitter4j-core-4.0.3.jar
. This file core
is important and you need to add remaining .jars
when you use that application. If you're not sure, then copy all .jars
and paste it in libs
folder.+
in right top and choose File Dependency
then select the jars in libs folder.6. Click Ok and you're done.
Good luck :)
Even I faced the similar problem recently and adding it like this to the gradle dependencies seems to work for me:
compile group: 'org.twitter4j', name: 'twitter4j-core', version: '4.0.7'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With