gpt4 book ai didi

android - NoClassDefFoundError : com. 谷歌.firebase.FirebaseOptions

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:58:57 25 4
gpt4 key购买 nike

我在使用的其他测试设备 (4.4.2) 上不断收到 NoClassDefFoundError。但在我的测试设备 (Android 5.1) 上运行良好。

我尝试了我在谷歌上搜索过的解决方案,但似乎没有任何效果。

我正在使用 Firebase 实时数据库。有人可以帮忙吗?

错误日志如下:

06-03 01:36:29.607 2655-2655/mobapps.mypersonal.biz.grouptracker E/dalvikvm: Could not find class 'com.google.firebase.FirebaseOptions', referenced from method com.google.firebase.FirebaseApp.<init> 06-03 01:36:29.617 2655-2655/mobapps.mypersonal.biz.grouptracker E/dalvikvm: Could not find class 'com.google.firebase.FirebaseApp$zzb', referenced from method com.google.firebase.FirebaseApp.zzaJ 06-03 01:36:29.621 2655-2655/mobapps.mypersonal.biz.grouptracker E/dalvikvm: Could not find class 'com.google.firebase.FirebaseApiNotAvailableException', referenced from method com.google.firebase.FirebaseApp.getToken 06-03 01:36:29.629 2655-2655/mobapps.mypersonal.biz.grouptracker E/dalvikvm: Could not find class 'com.google.firebase.FirebaseApp$zza', referenced from method com.google.firebase.FirebaseApp.zza 06-03 01:36:29.639 2655-2655/mobapps.mypersonal.biz.grouptracker E/AndroidRuntime: FATAL EXCEPTION: main
Process: mobapps.mypersonal.biz.grouptracker, PID: 2655
java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions
at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1656)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1627)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5079)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4653)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4593)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5363)
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:828)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)
at dalvik.system.NativeStart.main(Native Method)

最佳答案

这就是为我解决问题的方法:

  1. 添加编译'com.android.support:multidex:1.0.2'到应用程序/build.gradle.

  2. android:name="android.support.multidex.MultiDexApplication"添加到AndroidManifest.xml中的应用标签。

    如果您使用的是自定义应用程序类,请跳过AndroidManifest.xml 并使您的 Application 类扩展 MultiDexApplication 而不是 Application。

关于android - NoClassDefFoundError : com. 谷歌.firebase.FirebaseOptions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37598691/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com