0

My build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

buildscript {
repositories 
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
}

android {
compileSdkVersion 22
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.myapp"
    minSdkVersion 19
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}

productFlavors {
    production {
        applicationId "com.myapp"
    }

    development {
        applicationId "com.myapp.development"
    }

    staging {
        applicationId "com.myapp.staging"
    }

    qa {
        applicationId "com.myapp.qa"
    }
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
sourceSets {
    main {
        res.srcDirs = ['src/main/res', 'src/main/res/drawable', 'src/main/res/views/activities', 'src/main/res/anim']
    }
}
}

repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile project(':facebook')
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile files('libs/gson-2.3.1.jar')
compile files('libs/retrofit-1.9.0.jar')
compile('com.digits.sdk.android:digits:1.8.0@aar') {
    transitive = true;
}
}

I have tried enabling multidex, no help from Fabric support forums too.

Also tried excluding gson module from digits as

compile('com.digits.sdk.android:digits:1.8.0@aar') {
    transitive = true;
    exclude module: 'gson';
}

PS: I only want to use phone number verification/signin feature, no twitter sign-in feature required. I am also using retrofit and picasso.

Ankita Chopra
  • 329
  • 4
  • 12
Shubham A.
  • 2,446
  • 4
  • 36
  • 68

2 Answers2

2

Your conflict is on retrofit, not gson.

Change exclude module: 'gson' to exclude module: 'retrofit' in your digits dependency.

iagreen
  • 31,470
  • 8
  • 76
  • 90
  • 2
    Just to add, Twitter internally have following dependencies library: --- digits -- tweet-ui -- picasso -- support-v4 (android) -- tweet-composer -- twitter-core -- gson -- retrofit I just excluded any of the above libraries I was using and it worked. – Shubham A. Sep 22 '15 at 03:15
1

When you include digits SDK, you don't actually need to include libraries like Picasso, Gson, Retrofit, Digit. These might actually create duplicate entry exception while parsing these libraries.