Error:Failed to resolve: com.twitter.sdk.android:twitter:2.3.0 - Android Studio

SumOne picture SumOne · Jan 15, 2017 · Viewed 13.6k times · Source

I am getting this error in my log cat

Error:Failed to resolve: com.twitter.sdk.android:twitter:2.3.0

When I try adding this dependency:

compile 'com.firebaseui:firebase-ui:1.1.1'

Can someone please help me out, I am not sure what I am doing wrong. This is the link from where I got the dependency from: https://github.com/firebase/FirebaseUI-Android. On a side note, I am not using twitter login or any sort of interaction with twitter in my application, so I am not sure why I get that error when I sync my gradle after putting that dependency.

Answer

Aman Shekhar picture Aman Shekhar · Jan 15, 2017

Your project's gradle file should look like this.

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

allprojects {
    repositories {
        jcenter()

        // Required for 'com.firebaseui:firebase-ui:1.1.1'
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
}