Reputation: 33
I am trying to integrate Twitter Login in my app, according to Twitter Fabric docs I am to add
compile('com.twitter.sdk.android:twitter-core:1.6.0@aar') {
transitive = true;
}
to my code to be able to compile but the Gradle is failing to resolve the Library I am getting the
Error:(25, 13) Failed to resolve: com.twitter.sdk.android:twitter-core:1.6.0
Show in File
Show in Project Structure dialog
and here is my full gradle file
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "xxxx.xxxx.xxxx.xxxxx"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.twitter.sdk.android:twitter-core:1.6.0@aar') {
transitive = true;
}
}
Upvotes: 0
Views: 253
Reputation: 33
I fixed it by modifying my build.gradle
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.+'
// The Fabric Gradle plugin uses an open ended version to
// react quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
//Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
and ofcourse adding the
compile ('com.twitter.sdk.android:twitter:1.6.0@aar'){
transitive = true;
}
}
in my top level gradle file
Upvotes: 2