В моем приложении для Android есть ошибка при компиляции приложения.Я работаю в последней Android-студии и использую Firebase UI Auth и Firebase Database. Все версии находятся в одном и том же файле уровня приложения. Почему я получаю эту ошибку
ОШИБКА:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.varunwadhwa.myapplication, PID: 12383
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.varunwadhwa.myapplication-G6TbLS-JLKb6r1uvHa6XnQ==/split_lib_dependencies_apk.apk)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source:64)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source:14)
at com.example.varunwadhwa.myapplication.MainActivity.onCreate(MainActivity.java:31)
at android.app.Activity.performCreate(Activity.java:7009)
at android.app.Activity.performCreate(Activity.java:7000)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Application terminated.
Build.gradle
implementation fileTree(include: ['*.jar'], dir: 'libs')
// implementation 'com.android.support:appcompat-v7:29.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
// implementation 'com.google.firebase:firebase-database:16.0.1'
// implementation 'com.firebaseui:firebase-ui-database:3.1.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.firebaseui:firebase-ui-database:3.2.2'
Ошибка Build.gradle Все библиотеки com.android.support должны использовать одну и ту же спецификацию версий (смешивание версий может привести к сбоям во время выполнения).Найдено версии 28.0.0, 27.1.0, 27.0.2.Примеры включают com.android.support:animated-vector-drawable:28.0.0 и com.android.support:exifinterface:27.1.0 less ... (⌘F1) Существуют некоторые комбинации библиотек или инструментов и библиотек, которыенесовместимы или могут привести к ошибкам.Одной из таких несовместимостей является компиляция с версией библиотек поддержки Android, которая не является последней версией (или, в частности, версией ниже, чем ваша targetSdkVersion).Идентификатор проблемы: GradleCompatible
build.gradle (проект: мое приложение)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven{
url="com.google.maven"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle (модуль: приложение)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.varunwadhwa.myapplication"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// implementation 'com.android.support:appcompat-v7:29.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
// implementation 'com.google.firebase:firebase-database:16.0.1'
// implementation 'com.firebaseui:firebase-ui-database:3.1.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.firebaseui:firebase-ui-database:4.3.2'
}