Failed to resolve: com.twitter.sdk.android:twitter:1.13.1

android
fabric
twitterkit

#1

Hi,

I am using Fabric to integrate Twitter login, I have followed the instruction provided by fabric plugin, but I am getting below error when I am building project.

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

I have tried to build many times but error is same, Please help.


#2

Hey @ashish031988,

Happy to help with this - can you share your build.gradle and imports from when you’re getting this?


#3

Hi @bonnell,

I’m getting the same error as @ashish031988. I just updated to Android Studio 2.1, is that an issue? Here’s my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.name.name"
        minSdkVersion 21
        targetSdkVersion 22
        versionCode 2
        versionName "0.2"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    wearApp project(':wear')
    compile 'com.google.android.gms:play-services-wearable:8.4.0'
    compile 'com.google.android.gms:play-services-identity:8.4.0'
    compile 'com.google.android.gms:play-services-plus:8.4.0'
    compile 'com.google.android.gms:play-services-auth:8.4.0'
    compile 'com.google.android.gms:play-services-appinvite:8.4.0'
    compile 'com.google.android.gms:play-services-analytics:8.4.0'
    compile('com.twitter.sdk.android:twitter:1.13.1@aar') {
        transitive = true;
    }

}

apply plugin: 'com.google.gms.google-services'

#4

Ah, I solved the problem here. It required me to add classpath 'io.fabric.tools:gradle:1.+' to the gradle class path. The fabric docs should say this… https://docs.fabric.io/android/twitter/twitter.html – I had to go to fabric’s github page to figure this out


#5

Thanks @mattgroh and good to know you’re all set now. We’re working on getting that page more in sync with our current install steps listed here: https://fabric.io/kits/android/twitterkit/install

Listing that as a reference in case other developers have similar questions.