【发布时间】:2018-05-08 12:57:34
【问题描述】:
我正在使用 Firebase 和 Maps API 构建一个 Android 应用,但我收到以下错误:
请通过更新 google-services 插件的版本(有关最新版本的信息可在 https://bintray.com/android/android-tools/com.google.gms.google-services/ 获得)或将 com.google.android.gms 的版本更新到 12.0 来解决版本冲突。 1.
这是我在 build.gradle module:app 文件中的内容。有人可以帮助确定这里发生了什么冲突吗?
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.simcoder.uber"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.google.firebase:firebase-database:11.6.0'
compile 'com.google.firebase:firebase-auth:11.6.0'
compile 'com.google.firebase:firebase-storage:11.6.0'
compile 'com.firebase:geofire-android:2.1.1'
compile 'com.google.android.gms:play-services:12.0.1'
compile 'com.github.bumptech.glide:glide:4.0.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.github.jd-alexander:library:1.1.0'
compile 'com.paypal.sdk:paypal-android-sdk:2.15.3'
compile 'com.google.gms:google-services:3.3.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
-
您是否已将 firebase 版本更新为最新版本,即 15 ?
-
这确实解决了问题,谢谢:)
-
没问题。快乐编码:)
标签: android api google-maps firebase-authentication