朋友们,我最近开始在Android上工作,如果你发现一些基本错误请原谅。
这是我的问题。
我试图解决过去2天的问题,但没有取得任何成功。 最近,我将我的Android工作室升级到3.0.1,并尝试编译我的项目,但我遇到了以下错误
错误:任务':app:processDebugGoogleServices'执行失败。 请修改版本冲突,方法是更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms版本更新为11.0.0。
请检查我的build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
dependencies {
implementation 'com.google.firebase:firebase-messaging:11.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
//adding volley library
//Picasso
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.android.volley:volley:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.gms:google-services:3.1.2'
// compile 'com.google.gms:google-services:3.1.1'
compile 'com.google.android.gms:play-services:11.0.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.google.android.gms:play-services-ads:11.0.0'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:11.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.firebase:firebase-client-android:2.4.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v4:25.2.0'
}
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "xyzy.abc.sdf"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dexOptions {
// incremental true
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard- android.txt'), 'proguard-rules.pro'
}
}
buildTypes {
release {
shrinkResources true // This must be first
minifyEnabled true // This must be after shrinkResources
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/license.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICEi5'
exclude 'META-INF/NOTICE'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
productFlavors {
}
}
apply plugin: 'com.google.gms.google-services'
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
}
答案 0 :(得分:0)
Upgrade your firebase and google versions
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:11.0.0'
to
compile 'com.google.firebase:firebase-core:11.6.2'
compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.google.android.gms:play-services-auth:11.6.2'