无法导入“ import com.google.firebase.firestore.MetadataChanges”

时间:2019-03-02 18:20:06

标签: java android firebase google-cloud-firestore firebaseui

我对FirestoreRecyclerOptions有疑问: FirestoreRecyclerOptions无法导入

  

com.google.firebase.firestore.MetadataChanges

编译程序时出现以下错误

  

java.lang.NoClassDefFoundError:无法解决以下问题:Lcom / google / firebase / firestore / MetadataChanges

我认为这是gradle中的版本问题。你知道如何解决这个问题吗?

 implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.firebaseui:firebase-ui-auth:4.3.0'
//Firestore
implementation 'com.google.firebase:firebase-firestore:18.0.1'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:4.3.1'
implementation 'com.google.firebase:firebase-functions:16.1.3'
implementation 'com.firebaseui:firebase-ui-storage:4.3.1'

调用回收器选项时的功能

 private FirestoreRecyclerOptions<chat> generateOptionsForAdapter(Query query){

    return new FirestoreRecyclerOptions.Builder<chat>()
            .setQuery(query,chat.class)
            .setLifecycleOwner(this)
            .build();

}

0 个答案:

没有答案