【发布时间】:2019-04-04 06:34:21
【问题描述】:
每当我添加 firebase 数据库依赖项时,它都会显示 appcompat 错误。像这样
"所有 com.android.support 库必须使用完全相同的版本 规范(混合版本可能导致运行时崩溃)。成立 版本 28.0.0、26.1.0。例子包括 com.android.support:animated-vector-drawable:28.0.0 和 com.android.support:support-media-compat:26.1.0"
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-
layout:1.1.3'
implementation 'com.google.firebase:firebase-database:16.1.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'
}
【问题讨论】:
-
什么是 gradle 目标版本代码和名称?
-
发布您的应用程序级别和项目级别 gradle,因为我尝试了您的依赖项及其工作正常
-
也是
com.android.support:support-media-compat:26.1.0也是这个版本28.0.0 -
compileSdkVersion 28 defaultConfig { applicationId "com.example.uemultancampus" minSdkVersion 23 targetSdkVersion 28
-
感谢您的回复,但我在这里给出了错误。
标签: android firebase-realtime-database