Fabric crash at startup

妖精的绣舞 提交于 2019-12-23 12:34:01

问题


My app crashed at this line inside onCreate() function

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

The device is SAMSUNG SM-G313 HZ, running 4.4.2 I've reported to their Twitter dev forum, but my post is automarked as spam.

Anybody knows a workaround?

This is the onCreate function:

public void onCreate() {
        super.onCreate();
        Fabric.with(this, new Crashlytics());
        graph = ObjectGraph.create(getModules());

        ImageLoaderConfiguration imageLoaderConfiguration =
                ImageLoaderConfiguration.
                        createDefault(getApplicationContext());
        ImageLoader.getInstance().init(imageLoaderConfiguration);

        MMX.init(this, R.raw.initfile);
        MMX.registerListener(new MessageEventListenerForLockScreen(this));


        Intent intent = new Intent(getString(R.string.wake_up_key));
        MMX.registerWakeupBroadcast(intent);

    }

I've already declared fabric in AndroidManifest

<meta-data
            android:name="io.fabric.ApiKey"
            android:value="mykeyhere_a1cff923b11afaab1be7b005474d99b912b3"/>

Logcat:

10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime: FATAL EXCEPTION: main
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime: Process: funride.android.com.rideshare, PID: 16717
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime: java.lang.VerifyError: com/crashlytics/android/core/CrashlyticsCore
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at com.crashlytics.android.Crashlytics.<init>(Crashlytics.java:29)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at funride.android.com.rideshare.application.CloudBikeApp.onCreate(CloudBikeApp.java:33)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4593)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at android.app.ActivityThread.access$1500(ActivityThread.java:151)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:110)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:193)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5344)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:676)
10-06 13:31:53.452 16717-16717/funride.android.com.rideshare E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)

回答1:


It may be a conflict with third-party libraries, I had a similar crash when using Retrofit2, because Fabric uses an older version of Retrofit.




回答2:


It may be that you are using the retrofit 2.0 beta?

Twitter currently uses retrofit 1.8 and won't update until the final release of retrofit 2.0

Discussion that will hopefully be updated when it's fixed can be found here: https://twittercommunity.com/t/java-lang-verifyerror/53974



来源:https://stackoverflow.com/questions/32962007/fabric-crash-at-startup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!