【问题标题】:Firebase analytics crash while running android app运行 Android 应用程序时 Firebase 分析崩溃
【发布时间】:2021-11-15 07:54:03
【问题描述】:

使用供应商的依赖项后,Firebase 分析在打开应用时出现以下错误。我尝试使用最新的依赖项,但似乎不起作用。

Logcat

从标签管理器中找到 firebase-analytic 17.0.0 的依赖关系树 通常使用 19.0.1。这与崩溃有关吗?

Dependencies tree 1

Dependencies tree 2

build.gradle(项目)

buildscript {
ext.kotlin_version = "1.4.32"
repositories {

    google()

    maven { url 'https://developer.huawei.com/repo/' }

    mavenCentral()
    maven { url "https://plugins.gradle.org/m2/" }

        url "https://maven.guardsquare.com"

        content {
            includeGroupByRegex "com\\.guardsquare.*"
        }
        authentication {
            basic(BasicAuthentication)
        }
    }
}
dependencies {
    // Google
    classpath 'com.google.gms:google-services:4.3.10'
    // Huawei
    classpath 'com.huawei.agconnect:agcp:1.6.0.300'

    classpath 'com.android.tools.build:gradle:7.0.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
    classpath 'com.google.firebase:perf-plugin:1.4.0'
    classpath "io.realm:realm-gradle-plugin:4.3.3"
    classpath "com.github.ben-manes:gradle-versions-plugin:0.39.0"
    classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1'
    classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    classpath "org.jacoco:org.jacoco.core:0.8.7"
    classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3"
    classpath "com.guardsquare:proguard-gradle:7.1.1"
    classpath 'com.guardsquare:dexguard-gradle-plugin:1.1.12'
    classpath "com.newrelic.agent.android:agent-gradle-plugin:6.2.0"


}

build.gradle(项目)

android {

compileSdkVersion 30
buildToolsVersion "30.0.3"

useLibrary 'org.apache.http.legacy'

defaultConfig {
    applicationId "com.tdcm.trueidapp"
    minSdkVersion 21
    targetSdkVersion 30

    versionName "${versionNameApp}"
    versionCode versionBuildNumber
    renderscriptTargetApi 21
    renderscriptSupportModeEnabled true

    multiDexEnabled true

    ndk {
        abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
    }

}


dexOptions {
    preDexLibraries true
    javaMaxHeapSize "4g"
}

bundle {
    density.enableSplit = true
    abi.enableSplit = true
    language.enableSplit = true
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_11
    targetCompatibility JavaVersion.VERSION_11
}

testOptions {
    unitTests.returnDefaultValues = true
}

buildFeatures {
    dataBinding true
}

aaptOptions {
    ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    noCompress 'db'
}
}

newrelic {
    excludeVariantInstrumentation("debug")
}

dependencies {
    implementation project(":features:splashscreen")
    implementation project(":common:share:datalegacy")

    implementation(name: 'appbase', ext: 'aar')

    Glide()
    UnitTesting()
}

附言。抱歉图片,我还不能上传。

【问题讨论】:

    标签: android firebase kotlin gradle firebase-analytics


    【解决方案1】:

    已解决

    只需添加以下两行

    implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
    

    implementation "io.grpc:grpc-okhttp:1.32.2"
    

    【讨论】:

      猜你喜欢
      • 2020-08-28
      • 1970-01-01
      • 2022-01-20
      • 2019-03-27
      • 2016-01-14
      • 2021-02-11
      • 1970-01-01
      • 2012-06-26
      • 2016-10-26
      相关资源
      最近更新 更多