【发布时间】:2018-02-16 15:28:45
【问题描述】:
在添加之前,我正在使用 firestore db,没有任何问题:
compile 'com.google.firebase:firebase-
storage:11.8.0'
现在我收到消息:Error:Execution failed for task':app:processDebugGoogleServices'.
请通过以下方式修复版本冲突 更新谷歌服务的版本 插件(有关最新版本的信息是 可在 https://bintray.com/android/android- 工具/com.google.gms.google-services/) 或 更新 com.google.android.gms 的版本 到 11.6.0。 我已经尝试了我的所有版本组合 gradle 文件没有成功。 当我注释掉 ..storage ll.8.0 应用程序时 gradle 构建。
以下是我的应用程序 gradle 文件:
apply plugin: 'com.android.application'
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath '
com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.google.gms:google-
services:3.2.0'
}
}
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.XXXXXX.XXXX"
minSdkVersion 16
targetSdkVersion 26
versionName "2.0"
multiDexEnabled true //Add this
testInstrumentationRunner
"android.support.test.runner.
AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles
getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
repositories {
flatDir { dirs "libs" }
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
def BUTTER_KNIFE_VERSION = "8.5.1" //current
version of butterknife
dependencies {
implementation fileTree(include: ['*.jar'],
dir: 'libs')
implementation 'com.android.support:appcompat-
v7:26.1'
implementation
'com.android.support.constraint:constraint-
layout:1.0.2'
implementation(name: "UGrokItApi-release", ext:
"aar")
// support
implementation supportDependencies.appCompat
implementation supportDependencies.support
implementation supportDependencies.design
implementation supportDependencies.recyclerView
implementation supportDependencies.cardView
implementation 'com.google.firebase:firebase-
database:11.6.0'
implementation 'com.google.firebase:firebase-
auth:11.6.0'
compile 'com.firebaseui:firebase-ui-auth:3.1.0'
compile 'com.google.android.gms:play-services-
auth:11.6.0'
compile 'com.google.firebase:firebase-
storage:11.8.0'
compile 'com.android.support:design:26.1.0'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor
'com.jakewharton:butterknife-compiler:8.8.1'
libraries.firebaseUIDatabase
'com.google.firebase:firebase-database:11.6.0'
implementation 'com.firebaseui:firebase-ui-
firestore:3.1.0'
implementation
'com.android.support:design:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation
'com.android.support.test:runner:1.0.1'
androidTestImplementation
'com.android.support.test.espresso:espresso-
core:3.0.1'
compile 'com.google.firebase:firebase-
firestore:11.6.0'
compile 'com.firebaseui:firebase-ui-
firestore:3.1.0'
compile 'com.android.support:recyclerview-
v7:26.1.0'
compile 'com.android.support:cardview-
v7:26.1.0'
compile 'com.android.support:support-
annotations:27.0.1'
compile 'com.google.android.gms:play-services-
location:11.6.0'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】: