这是我得到的错误:
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.example.akash.firedemo-Tniw8sNtmq6E7zMSOD54YQ==/split_lib_dependencies_apk.apk)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source:128)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source:22)
at com.example.akash.firedemo.MainActivity.onCreate(MainActivity.java:29)
答案 0 :(得分:1)
您应该升级库。
首先,在项目级build.gradle
文件中,添加以下内容:
classpath 'com.google.gms:google-services:4.0.1'
然后,在模块级build.gradle
文件中,添加以下内容:
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.firebaseui:firebase-ui-auth:4.2.1'