Bharthan
Bharthan

Reputation: 1532

Cannot resolve symbol in Android

I am working on integrating twitter with my android application, I am using twitter4j library to do this.

I have added the twitter4j library files and put it in a folder libs and added compile dependency in build.gradle inside app folder

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.google.android.gms:play-services:6.5.+'
    compile 'org.twitter4j:twitter4j-core:4.0.2'
} 

but I am still not able to use this library enter image description here

Upvotes: 3

Views: 576

Answers (2)

DoubleA
DoubleA

Reputation: 56

In the Gradle drawer to the right, could you hit the refresh button to see if that helps? Also, the dependencies block that you've pasted above doesn't contain a directive for twitter4j - did you happen to simply miss it out in the question, or is it really missing from the gradle.build file?

Upvotes: 3

felipetortella
felipetortella

Reputation: 61

Try to add this at "repositories" on your buildscript.

repositories { mavenCentral() }

Upvotes: 2

Related Questions