最后我发现了我的问题。我以前没见过,但是,
Thread.UncaughtExceptionHandler
我用这个代码解决了这个问题:
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Order is important!
// First, start Crashlytics
Fabric.with(this, new Answers(), new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build());
// Second, set custom UncaughtExceptionHandler
Thread.UncaughtExceptionHandler mDefaultUEH = Thread.getDefaultUncaughtExceptionHandler();
ExceptionHandler exceptionHandler = new ExceptionHandler(this, mDefaultUEH);
Thread.setDefaultUncaughtExceptionHandler(exceptionHandler);
}