0

I am getting error while init Fabric with Fabric.with(this);.

My build.gradle is below:

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

    dependencies {
        classpath 'io.fabric.tools:gradle:1.21.2'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

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

...

dependencies {
...
//twitter fabric sdk
    compile('com.stripe:stripe-android:1.0.0.1@aar') {
        transitive = true;
    }
    compile('io.fabric.sdk.android:fabric:1.3.10@aar') {
        transitive = true;
    }

My error log is as below:

java.lang.NoClassDefFoundError: Failed resolution of: Lio/fabric/sdk/android/DefaultLogger; at io.fabric.sdk.android.Fabric.(Fabric.java:56) at io.fabric.sdk.android.Fabric.with(Fabric.java:308)

pRaNaY
  • 24,642
  • 24
  • 96
  • 146
  • Fabric comprises of many kits. Which one you trying to use? i.e crashlytics, twitter, mopub. Why not use the Fabric tool wizard to add the required code into your project? – Daan Jan 25 '16 at 11:34

1 Answers1

0

I got my answer Here

I just replace

Fabric.with(this)

with

TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);

    Fabric.with(this, new Twitter(authConfig));
pRaNaY
  • 24,642
  • 24
  • 96
  • 146