Fabric.io with Android 4.x fails



I get a hard failure on every 4.x Android device I run Fabric.io on. It crashes on the first thing it needs to do:

TwitterAuthConfig authConfig = new TwitterAuthConfig(Constants.TWITTER_KEY, Constants.TWITTER_SECRET);

// crashes here on any 4.x device
Fabric.with(this, new Twitter(authConfig));

Anyone else seen this and have a solution?


Can you post the contents of the Android Logcat? Also what version of Twitter kit are you using?


I’m using Fabric. What TwitterKit version does it install? That wasn’t anything that that installed by the plugin. and I didn’t install any.

java.lang.NoClassDefFoundError: com.twitter.sdk.android.tweetui.internal.UserSessionProvider
at com.twitter.sdk.android.tweetui.TweetUi.onPreExecute(TweetUi.java:93)
at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)
at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)
at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)
at io.fabric.sdk.android.Kit.initialize(Kit.java:66)
at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:431)
at io.fabric.sdk.android.Fabric.init(Fabric.java:375)
at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:332)
at io.fabric.sdk.android.Fabric.with(Fabric.java:303)


You can find the Twitter Kit version in the build.gradle file. Should look something like:

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

closed #5