Fabric.io with Android 4.x fails

android

#1

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?


#2

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


#3

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.

FATAL EXCEPTION: main
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)


#4

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;
}

#5