使用Google Play服务10.2.98的API 19中的Firebase Performance崩溃 [英] Firebase Performance crashing in API 19 with Google Play Services 10.2.98

查看:203
本文介绍了使用Google Play服务10.2.98的API 19中的Firebase Performance崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这周,我开始在新应用中测试新的Firebase性能.将Firebase用于Auth和DB等其他功能后,我已经将所有软件包更新到了​​Firebase 10.2.6的最新版本,并按照所有先决条件说明进行操作.

This week I started testing the new Firebase Performance in my new app. Once I am using Firebase for other features like Auth and DB I already updated all packages to last 10.2.6 Firebase version and follow all pre req instructions.

minAPI是19.

minAPI is 19.

我的问题是,只有在运行Android 4.4.1的真实Galaxy Duos设备中,带有Google Play Services 10.2.98的API 19中的App才会崩溃. App启动时,无法在设备中找到firebase-perf.

My problem is App is crashing only in API 19 with Google Play Services 10.2.98 in a real Galaxy Duos device running Android 4.4.1. When App starts it could not find firebase-perf in device.

只有在此软件包中以及在其他设备和更高版本中才发生这种情况,一切都很好,我可以在Firebase Performance Dashboard中看到数据.

It is only happening with this package and in other devices and higher versions everything is fine and I can see data in Firebase Performance Dashboard.

提示?

下面的Stacktrace

Stacktrace below

此致

Process: com.mobilecodelabs.fb.trampo, PID: 2727
java.lang.RuntimeException: Unable to get provider com.google.firebase.perf.provider.FirebasePerfProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.perf.provider.FirebasePerfProvider" on path: DexPathList[[zip file "/data/app/com.mobilecodelabs.fb.trampo-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.mobilecodelabs.fb.trampo-2, /vendor/lib, /system/lib]]
    at android.app.ActivityThread.installProvider(ActivityThread.java:4793)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4325)
    at android.app.ActivityThread.access$1500(ActivityThread.java:135)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5017)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.perf.provider.FirebasePerfProvider" on path: DexPathList[[zip file "/data/app/com.mobilecodelabs.fb.trampo-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.mobilecodelabs.fb.trampo-2, /vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
    at android.app.ActivityThread.installProvider(ActivityThread.java:4778)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4325) 
    at android.app.ActivityThread.access$1500(ActivityThread.java:135) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:136) 
    at android.app.ActivityThread.main(ActivityThread.java:5017) 
    at java.lang.reflect.Method.invokeNative(Native Method) 
    at java.lang.reflect.Method.invoke(Method.java:515) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
    at dalvik.system.NativeStart.main(Native Method) 

推荐答案

请首先检查

defaultConfig {
 multiDexEnabled true
}
dependencies {
 implementation 'androidx.multidex:multidex:2.0.1'
}

然后在Application类中添加此按钮即可解决此问题

Then in Application class adding this solved this problem

 @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }

这篇关于使用Google Play服务10.2.98的API 19中的Firebase Performance崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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