4

我的应用程序在 onCreate() 函数内的这一行崩溃了

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

该设备是 SAMSUNG SM-G313 HZ,运行 4.4.2 我已向他们的 Twitter 开发论坛报告,但我的帖子被自动标记为垃圾邮件。

有人知道解决方法吗?

这是onCreate功能:

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);

    }

我已经在 AndroidManifest 中声明了 fabric

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

日志猫:

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)
4

2 回答 2

1

可能是您使用的是改造 2.0 测试版?

Twitter目前使用retrofit 1.8,直到retrofit 2.0的最终版本才会更新

可以在此处找到希望在修复后更新的讨论:https ://twittercommunity.com/t/java-lang-verifyerror/53974

于 2015-10-26T11:28:40.680 回答
1

可能是和第三方库有冲突,我在使用Retrofit2的时候也出现过类似的崩溃,因为Fabric使用的是旧版本的Retrofit。

于 2015-10-07T04:00:22.343 回答