Lcom/google/firebase/FirebaseApp类中没有虚拟方法zzbqo()Z;或其超级类("com.google.firebase.FirebaseApp"的声明 [英] No virtual method zzbqo()Z in class Lcom/google/firebase/FirebaseApp; or its super classes (declaration of 'com.google.firebase.FirebaseApp'

查看:102
本文介绍了Lcom/google/firebase/FirebaseApp类中没有虚拟方法zzbqo()Z;或其超级类("com.google.firebase.FirebaseApp"的声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的android应用中,编译该应用时出错.我正在最新的android studio中工作,并且使用Firebase UI Auth和Firebase数据库,所有版本都在应用程序级别成绩文件中相同,那么为什么我会收到此错误

In my android app, there is an error while compiling the app. I am working in the latest android studio and using Firebase UI Auth and Firebase Database all the versions are in same in App level Grade file then why I am getting this error

错误:

E/AndroidRuntime: FATAL EXCEPTION: main
              Process: com.dotndash.abjb.vishwakarmajanganna, PID: 7689
              java.lang.NoSuchMethodError: No virtual method zzbqo()Z in class Lcom/google/firebase/FirebaseApp; or its super classes (declaration of 'com.google.firebase.FirebaseApp' appears in /data/app/com.dotndash.abjb.vishwakarmajanganna-1/split_lib_dependencies_apk.apk)
                  at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
                  at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
                  at com.dotndash.abjb.vishwakarmajanganna.RegisterActivity.onCreate(RegisterActivity.java:38)
                  at android.app.Activity.performCreate(Activity.java:6956)
                  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
                  at android.app.ActivityThread.-wrap14(ActivityThread.java)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:154)
                  at android.app.ActivityThread.main(ActivityThread.java:6776)
                  at java.lang.reflect.Method.invoke(Native Method)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

Build.gradle

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.firebaseui:firebase-ui-auth:4.0.0'
}

推荐答案

升级以下内容:

implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.firebaseui:firebase-ui-auth:4.0.0'

对此:

implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'

还添加:

implementation 'com.google.firebase:firebase-core:16.0.1'

在顶级gradle文件中升级google-service插件:

In the top level gradle file upgrade the google-service plugin:

classpath 'com.google.gms:google-services:4.0.1'

https://firebase.google.com/support/release-notes/android

firebaseui需要与firebase版本兼容,请查看以下链接以获取更多信息:

The firebaseui needs to be compatible with the firebase versions, check the following link for more information:

https://github.com/firebase/FirebaseUI- Android/blob/master/README.md#dependencies

这篇关于Lcom/google/firebase/FirebaseApp类中没有虚拟方法zzbqo()Z;或其超级类("com.google.firebase.FirebaseApp"的声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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