我在许多项目中使用Fabric
Fabric.with(this, Crashlytics())
但是我在Android 8.1上有很多崩溃专业知识
java.lang.RuntimeException:
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6476)
at android.app.ActivityThread.-wrap2 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1969)
at android.os.Handler.dispatchMessage (Handler.java:109)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7377)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:963)
Caused by: java.lang.IllegalStateException:
at android.app.ContextImpl.getSharedPreferences (ContextImpl.java:419)
at android.app.ContextImpl.getSharedPreferences (ContextImpl.java:404)
at android.content.ContextWrapper.getSharedPreferences (ContextWrapper.java:167)
at io.fabric.sdk.android.services.persistence.PreferenceStoreImpl.<init> (PreferenceStoreImpl.java:39)
at io.fabric.sdk.android.services.common.AdvertisingInfoProvider.<init> (AdvertisingInfoProvider.java:37)
at io.fabric.sdk.android.services.common.IdManager.<init> (IdManager.java:114)
at io.fabric.sdk.android.Fabric$Builder.build (Fabric.java:262)
at io.fabric.sdk.android.Fabric.with (Fabric.java:313)
at kdev.prayertimes.PrayerApplication.onCreate (PrayerApplication.java:14)
at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1123)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6461)
at android.app.ActivityThread.-wrap2 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1969)
at android.os.Handler.dispatchMessage (Handler.java:109)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7377)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:963)
如何解决这个问题?为什么Fabric会导致应用在启动时崩溃?