所以我尝试将Firebase数据库连接到android studio应用程序。出现此错误:
请通过更新以下版本来解决版本冲突: google-services插件(有关最新版本的信息是 可在 https://bintray.com/android/android-tools/com.google.gms.google-services/) 或将com.google.android.gms的版本更新为9.0.0。
我更改了版本,但仍然无法使用。如您所见,我更改了版本16。
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.firebase:firebase-database:16.0.4'
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'
}
我看不到问题。我在这上面呆了几个小时。
答案 0 :(得分:0)
确保在Project
build.gradle中提供了gms类路径,如下所示:
dependencies {
...
classpath 'com.google.gms:google-services:4.3.2'
}