简体   繁体   中英

Use fabric (Crashlytics and Twitter) android

I use method loggin with button Twitter, but recently I included crashlytics, crashlytics work good in my app except in the screen login, the logcat show the message:

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

and crash my app, how resolve this problem?, is the only screen with the error

In order to start the Fabric instance, first

  1. Create a class called MyApplication which extends the Application class

  2. call Fabric.with(this, new Crashlytics()); inside onCreate

public class MyApplication extends Application {

@Override
public void onCreate() {

    super.onCreate();
    Fabric.with(this, new Crashlytics());

}

}

  1. In your manifest file's application file, do the following

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM