gpt4 book ai didi

java - QueryDocumentSnapshot 无法解析

转载 作者:行者123 更新时间:2023-11-29 23:14:08 24 4
gpt4 key购买 nike

QueryDocumentSnapshot 并非无法解析。我尝试更改 firebase-firestorefirebase-core 依赖项的版本,但仍然不起作用。

以下是 Firebase 导入:

import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QueryDocumentSnapshot;
import com.google.firebase.firestore.QuerySnapshot;

这里是依赖

    implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.android.support:support-v4:26.1.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.getbase:floatingactionbutton:1.10.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-firestore:11.8.0'
implementation 'com.google.firebase:firebase-core: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.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation files('libs/activation.jar')
implementation files('libs/additionnal.jar')
implementation files('libs/mail.jar')

最佳答案

要解决这个问题,请更改以下依赖项:

implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-firestore:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'

与相应的最新版本:

implementation 'com.google.firebase:firebase-storage:16.1.0'
implementation 'com.google.firebase:firebase-firestore:18.2.0'
implementation 'com.google.firebase:firebase-core:16.0.8'

还要确保:

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

在您的 build.gradle(项目)文件中。

关于java - QueryDocumentSnapshot 无法解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55597451/

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