Yuval Yuval - 1 year ago 91
Android Question

Adding twitter-kit to android studio project

I am trying to add enable logging in with twitter to my application.
I am following this manual in order to do so.
When I'm trying to sync the gradle after adding to the dependencies these lines:

compile('com.twitter.sdk.android:twitter:1.3.2@aar') {
transitive = true;

(as they instruct in their website)
I recieve this gradle error:

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

How can I fix this issue?
Thank you very much,

Answer Source

You need to add Fabric at the top of your build.gradle - you probably already have the apply plugin: 'com.android.application' line, just put all of this stuff in its place.

buildscript {
  repositories {
    maven { url 'https://maven.fabric.io/repo' }
  dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
  maven { url 'https://maven.fabric.io/repo' }

But this is just one hurdle - next you're going to have to authenticate to Fabric itself. Basically, you started in the wrong place - Twitter wants you to start by going to https://get.fabric.io/ and integrating Fabric into your workflow.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download