QueryDocumentSnapshot не может разрешить

QueryDocumentSnapshot не может быть разрешено. Я пытался изменить версии зависимостей firebase-firestore и firebase-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')

Пользовательский скаляр GraphQL
Пользовательский скаляр GraphQL
Листовые узлы системы типов GraphQL называются скалярами. Достигнув скалярного типа, невозможно спуститься дальше по иерархии типов. Скалярный тип...
Как вычислять биты и понимать побитовые операторы в Java - объяснение с примерами
Как вычислять биты и понимать побитовые операторы в Java - объяснение с примерами
В компьютерном программировании биты играют важнейшую роль в представлении и манипулировании данными на двоичном уровне. Побитовые операции...
Поднятие тревоги для долго выполняющихся методов в Spring Boot
Поднятие тревоги для долго выполняющихся методов в Spring Boot
Приходилось ли вам сталкиваться с требованиями, в которых вас могли попросить поднять тревогу или выдать ошибку, когда метод Java занимает больше...
Полный курс Java для разработчиков веб-сайтов и приложений
Полный курс Java для разработчиков веб-сайтов и приложений
Получите сертификат Java Web и Application Developer, используя наш курс.
1
0
887
1
Перейти к ответу Данный вопрос помечен как решенный

Ответы 1

Ответ принят как подходящий

Чтобы решить эту проблему, измените следующие зависимости:

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.lang.NoSuchMethodError: нет виртуального метода zzbqp()Ljava/lang/String; в классе Lcom/google/firebase/FirebaseApp; или его суперклассы (объявление 'com.google.firebase.FirebaseApp' появляется в /data/app/com.example.dell.step-0EFkj52NpZr3iw4rjYmqKQ==/spl‌​it_lib_dependencies_‌​apk.apk)

Saba Nayab 09.04.2019 20:49

я устал от этого, но это помогло "stackoverflow.com/questions/51336198/…"

Saba Nayab 09.04.2019 20:50

В этом случае поделитесь всем содержимым обоих файлов build.gradle.

Alex Mamo 09.04.2019 20:51

Не смешивайте версии, просто используйте ту, что в моем ответе.

Alex Mamo 09.04.2019 20:51

Поэтому, пожалуйста, поделитесь всем содержимым обоих ваших файлов build.gradle, как было предложено ранее.

Alex Mamo 09.04.2019 22:39

Другие вопросы по теме