Twitter login is not working with crashlytics sdk. Error: Must start Twitter Kit with Fabric.with() first

153 Views Asked by At

I'm already using the twitter login functionality in my app and its working fine. But currently I need to integrate crashlytics in my android app along with the twitter login functionality.

I've followed all the steps which are mentioned here: https://firebase.google.com/docs/crashlytics/get-started.

I'm using below sdk for twitter login:

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

And for the crashlytics I'm using the below sdk:

compile('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
    transitive = true;
}

And I've initialized the fabric with:

TwitterAuthConfig authConfig =
                new TwitterAuthConfig(getResources().getString(R.string.twitter_key),
                        getResources().getString(R.string.twitter_secret));

Fabric.with(this, new Twitter(authConfig));

I've also tried the below code for fabric initialization:

Fabric.with(this, new Twitter(authConfig), new Crashlytics());

But nothing working, exception coming:

"java.lang.IllegalStateException: Must start Twitter Kit with Fabric.with() first"

Please help me here, Need to integrate crashlytics in my app. How can I resolve the above issue.

0

There are 0 best solutions below