CrashlyticsInitProvider跳过初始化

时间:2019-09-12 10:22:05

标签: android firebase crashlytics crashlytics-android gradle-dependencies

我目前正在将应用程序从Fabric迁移到Firebase Crashlytics,并按照official documentation中所述更新所有不同的库之后,我收到一条日志消息,指出已跳过Crashlytic初始化:

09-12 10:13:40.120 19176-19176/com.random.migratedApp I/CrashlyticsInitProvider: CrashlyticsInitProvider skipping initialization

该应用无法连接到Firebase控制台。

在对代码进行了几个小时的争执之后,我决定从头开始制作一个快速应用程序,以查看我的系统或库是否存在问题,但一切工作正常,能够正确初始化并能够查看崩溃在Firebase控制台中。

09-12 10:11:31.852 18414-18414/com.test.appFromScratch I/CrashlyticsCore: Initializing Crashlytics Core 2.7.0.33
09-12 10:11:31.897 18414-18414/com.test.appFromScratch I/CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful

我想知道我是否与某个依赖项不兼容,这可能会阻止Crashlytics成功初始化,但我无法弄清楚问题出在哪里。在这里,您可以看到我的应用程序依赖项列表:

ext {
     playServicesLibrary = '17.0.0'
     glideLibrary = '4.8.0'
     androidXDependencies = [
        androidXAnnotation: "androidx.annotation:annotation:1.0.0",
        constraintLayout  : 'androidx.constraintlayout:constraintlayout:1.1.2',
        vectorDrawable    : "androidx.vectordrawable:vectordrawable:1.0.0",
        recyclerView      : "androidx.recyclerview:recyclerview:1.0.0",
        roomRuntime       : 'androidx.room:room-runtime:2.1.0-rc01',
        androidXV13       : "androidx.legacy:legacy-support-v13:1.0.0",
        preference        : "androidx.preference:preference:1.1.0-alpha04",
        customtabs        : "androidx.browser:browser:1.0.0",
        appCompat         : "androidx.appcompat:appcompat:1.0.0",
        cardView          : "androidx.cardview:cardview:1.0.0",
        design            : "com.google.android.material:material:1.0.0-rc01"
     ]
     volley = [
        volleyLib       :  "com.android.volley:volley:1.0.0"
     ]
     googleDependencies = [
        firebaseJobDispatcher   :  "com.firebase:firebase-jobdispatcher:0.8.5",
        firebaseAnalytics       :  "com.google.firebase:firebase-analytics:17.2.0",
        firebaseMessaging       :  "com.google.firebase:firebase-messaging:19.0.0",
        googleMapsUtils         :  "com.google.maps.android:android-maps-utils:0.4.4",
        googleAnalytics         :  "com.google.android.gms:play-services-analytics:${playServicesLibrary}",
        googleLocation          :  "com.google.android.gms:play-services-location:${playServicesLibrary}",
        firebaseCore            :  "com.google.firebase:firebase-core:17.2.0",
        crashlytics         :  "com.crashlytics.sdk.android:crashlytics:2.10.1",
        googleMaps              :  "com.google.android.gms:play-services-maps:${playServicesLibrary}",
        billing                 :  "com.android.billingclient:billing:1.1"
     ]
     otherDependencies = [
        glideAnnotations  :  "com.github.bumptech.glide:annotations:${glideLibrary}",
        bottomNavigation  :  "com.aurelhubert:ahbottomnavigation:2.1.0",
        scaleImageView    :  "com.davemorrissey.labs:subsampling-scale-image-view:3.6.0",
        debugDatabase     :  "com.amitshekhar.android:debug-db:1.0.6",
        taptargetview     :  "com.getkeepsafe.taptargetview:taptargetview:1.12.0",
        actionButtons     :  "com.nightonke:boommenu:2.1.1",
        threetenabp       :  "com.jakewharton.threetenabp:threetenabp:1.1.0",
        glideOkHttp       :  "com.github.bumptech.glide:okhttp3-integration:${glideLibrary}",
        cookieBar         :  "org.aviran.cookiebar2:cookiebar2:1.1.2",
        eventBus          :  "org.greenrobot:eventbus:3.1.1",
        facebook          :  "com.facebook.android:facebook-android-sdk:5.0.1",
        multidex          :  'androidx.multidex:multidex:2.0.0',
        apache            :  "org.apache.commons:commons-lang3:3.7",
        semver            :  "com.vdurmont:semver4j:2.0.1",
        zXing             :  "me.dm7.barcodescanner:zxing:1.9.8",
        glide             :  "com.github.bumptech.glide:glide:${glideLibrary}",
        io                :  "commons-io:commons-io:2.6"
     ]
newLogin = [
        circleimageview : "de.hdodenhof:circleimageview:2.1.0",
        romandanylyk    : "com.romandanylyk:pageindicatorview:0.2.0",
        interceptor     : "com.squareup.okhttp3:logging-interceptor:3.6.0",
        calligraphy     : "uk.co.chrisjenx:calligraphy:2.2.0",
        retrofit        : "com.squareup.retrofit2:converter-gson:2.3.0",
        intuit          : "com.intuit.sdp:sdp-android:1.0.4",
        okhttp          : "com.squareup.okhttp3:okhttp:3.6.0",
     ]
allDependencies = [
        full:[
                androidXDependencies.androidXAnnotation,
                androidXDependencies.constraintLayout,
                androidXDependencies.vectorDrawable,
                androidXDependencies.recyclerView,
                androidXDependencies.roomRuntime,
                androidXDependencies.androidXV13,
                androidXDependencies.preference,
                androidXDependencies.customtabs,
                androidXDependencies.appCompat,
                androidXDependencies.cardView,
                androidXDependencies.design,
                volley.volleyLib,
                googleDependencies.firebaseJobDispatcher,
                googleDependencies.firebaseMessaging,
                googleDependencies.googleAnalytics,
                googleDependencies.googleMapsUtils,
                googleDependencies.googleLocation,
                googleDependencies.firebaseCore,
                googleDependencies.firebaseAnalytics,
                googleDependencies.googleMaps,
                googleDependencies.billing,
                otherDependencies.glideAnnotations,
                otherDependencies.bottomNavigation,
                otherDependencies.scaleImageView,
                otherDependencies.actionButtons,
                otherDependencies.taptargetview,
                otherDependencies.glideOkHttp,
                otherDependencies.threetenabp,
                otherDependencies.cookieBar,
                otherDependencies.facebook,
                otherDependencies.eventBus,
                otherDependencies.multidex,
                otherDependencies.semver,
                otherDependencies.zXing,
                otherDependencies.apache,
                otherDependencies.glide,
                otherDependencies.io,
                newLogin.circleimageview,
                newLogin.calligraphy,
                newLogin.interceptor,
                newLogin.retrofit,
                newLogin.romandanylyk,
                newLogin.intuit,
                newLogin.okhttp,
                googleDependencies.crashlytics
        ],
        debugDependencies:[
                otherDependencies.debugDatabase
        ]
    ]
}

干杯!

4 个答案:

答案 0 :(得分:3)

经过反复试验,我发现我正在使用的某些库可能依赖于Crashlytics。

添加此内容:

<meta-data
    tools:node="remove"
    android:name="io.fabric.ApiKey"/>
在AndroidManifest.xml文件的应用>标记内

干杯!

答案 1 :(得分:1)

我确实删除了

<meta-data
   tools:node="remove"
   android:name="previous_api_key"/>

来自清单和已解决的问题,该问题适用于旧版本的crashlytics。

答案 2 :(得分:0)

此处是Fabric / Firebaser-

如果您要将应用程序从Fabric迁移到Firebase,则无需更改代码-您只需遵循点击migration flow,您的应用程序及其Crashlytics数据就会显示在Firebase控制台中。 / p>

如果您处于混合集成状态,这意味着您拥有Fabric应用程序并在遵循Firebase Crashlytics文档的同时开始更改依赖关系,则应该

  1. 删除所有对Fabric的引用(API密钥,build.gradle依赖项,初始化代码),然后使用Firebase Crashlytics
  2. 删除您对Firebase所做的任何更改,以恢复到旧的Fabric设置,并遵循上面链接的迁移流程。

答案 3 :(得分:0)

首先,您需要检查双方是否都可以使用互联网。 (Consol和移动) 然后检查任何已经崩溃或已经在Gradle文件中实现的Crashlytics,然后删除或删除  首先,然后再试一次