【发布时间】:2019-05-31 23:33:47
【问题描述】:
尝试使用 FireStore 和 Google 身份验证创建一个简单的应用程序。 gradle 有问题:
在项目“app”中,解决了 Google Play 服务库依赖项 依赖于另一个精确版本(例如“[15.0.1]”,但不是 正在解决该版本。图书馆展示的行为将 不为人知。
依赖失败:com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[ 15.0.1],但 play-services-basement 版本是 16.0.1。
以下依赖项是直接或直接的项目依赖项 具有传递依赖关系,导致艺术 ifact 与 问题。 -- 项目 'app' 依赖于 com.google.firebase:firebase-firestore@17.1.5 -- 项目 'app' 依赖于 com.firebaseui:firebase-ui-auth@4.2.0
对于扩展调试信息,从命令行执行 Gradle ./gradlew --info :app:assembleDebug 查看依赖路径 神器。此错误消息来自 google-services Gradle 插件,在 https:// 报告问题 github.com/google/play-services-plugins 并通过添加禁用 “googleServices { disableVersionCheck = false }”到您的 b uild.gradle 文件。
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "myapp.com"
minSdkVersion 19
targetSdkVersion 27
versionCode 11
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
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.google.firebase:firebase-firestore:17.1.5'
implementation 'com.firebaseui:firebase-ui-auth:4.2.0'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin
项目等级:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
有人可以帮帮我吗?
【问题讨论】:
标签: android android-gradle-plugin firebaseui