com.google.android.gms.internal.firebase-perf.zzw上的NoClassDefFoundError [英] NoClassDefFoundError on com.google.android.gms.internal.firebase-perf.zzw

查看:81
本文介绍了com.google.android.gms.internal.firebase-perf.zzw上的NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Firebase Crashlytics收到的崩溃报告数量.我认为这与firebase-perf有关.

Received numbers of crash report from Firebase Crashlytics. It is related to firebase-perf I think.

Fatal Exception: java.lang.NoClassDefFoundError: com.google.android.gms.internal.firebase-perf.zzw
   at com.google.firebase.perf.metrics.Trace.start(Unknown Source:44)
   at com.google.android.gms.internal.firebase-perf.zze.onActivityStarted(Unknown Source:48)
   at android.app.Application.dispatchActivityStarted(Application.java:205)
   at android.app.Activity.onStart(Activity.java:1150)

已经在使用最新版本的Firebase和Google Play服务.

Already using the newest version of Firebase and Google Play Services.

它不会在Firebase测试实验室的设备上崩溃.但是约有1%的用户面临此问题.

It does not crash on devices in Firebase Test Lab. But ~1% of user facing this problem.

这与缺少GMS Core有关吗?如果是这样,如何正确处理它,而不会导致这些设备崩溃?

Is it related to absent of GMS Core? If so, how to handle it properly, not causing crash on those devices?

-更新---

项目build.gradle

project build.gradle

buildscript {
    repositories {
        google()
        maven {
            url 'https://maven.fabric.io/public'
        }
        jcenter()

    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha04'
        classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
        classpath 'com.google.firebase:firebase-plugins:1.1.5'
        classpath 'io.fabric.tools:gradle:1.25.4'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

应用程序build.gradle

App build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.2'
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "MASKED"
        minSdkVersion 18
        targetSdkVersion 28
        versionCode "MASKED"
        versionName "MASKED"
        resConfigs "en"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        dataBinding {
            enabled = true
        }
    }


    buildTypes {
        release {
            minifyEnabled true
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    lintOptions {
        abortOnError false
        textReport true
        textOutput 'stdout'
        checkReleaseBuilds false

    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    testImplementation 'junit:junit:4.12'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0-rc01'
    implementation 'androidx.annotation:annotation:1.0.0-rc01'
    implementation 'androidx.appcompat:appcompat:1.0.0-rc01'
    implementation 'androidx.leanback:leanback:1.0.0-rc01'
    implementation 'androidx.cardview:cardview:1.0.0-rc01'
    implementation 'androidx.gridlayout:gridlayout:1.0.0-rc01'
    implementation 'androidx.multidex:multidex:2.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'

    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-ads:15.0.1'
    implementation 'com.google.firebase:firebase-config:16.0.0'
    implementation 'com.google.firebase:firebase-perf:16.0.0'

    implementation 'com.google.android.material:material:1.0.0-rc01'
    implementation 'com.google.android.gms:play-services-oss-licenses:16.0.0'
    implementation 'com.google.android:flexbox:1.0.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'

}

// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'

推荐答案

Firebase支持刚刚确认我这是一个错误.他们现在正在研究这个(尽管他们还不能复制它).因此,我们应该期望在将来的Firebase版本中解决此问题.

Firebase support has just confirmed me this is a bug. They are working on this right now (although they weren't able to reproduce it yet). So we should expect this to be fixed in a future Firebase release.

这篇关于com.google.android.gms.internal.firebase-perf.zzw上的NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆