gpt4 book ai didi

java - 将谷歌服务从 9.0.0 更新到 10.0.1 Android Studio 2.2

转载 作者:太空狗 更新时间:2023-10-29 16:29:50 27 4
gpt4 key购买 nike

我收到一条错误消息

错误:任务“:app:processDebugGoogleServices”执行失败。

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

我试着查看 https://bintray.com/android/android-tools/com.google.gms.google-services/ com.google.gms:google-services:3.0.0 似乎是最新的。这是我的项目gradle

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

这就是我的应用程序 gradle 的样子

    apply plugin: 'com.android.application'


android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "sk.tipos.paradox02.citaj"
minSdkVersion 11
targetSdkVersion 23
versionCode 27
versionName '2.003'
}


buildTypes {
release {
minifyEnabled false
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.release
}

debug {
debuggable true
minifyEnabled false
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
// signingConfig signingConfigs.release
}
}


productFlavors {
}

lintOptions {

checkReleaseBuilds false

}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.google.gms:google-services:3.0.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'com.google.android.gms:play-services-ads:10.2.0'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.google.android.gms:play-services-analytics:10.2.0'

compile 'com.google.firebase:firebase-core:9.0.0'
compile 'com.google.firebase:firebase-crash:10.0.1'
compile 'com.google.firebase:firebase-ads:10.0.1'
compile 'com.android.support:multidex:1.0.1'
}

应用插件:'com.google.gms.google-services'

如果我将播放服务更改为 9.0.0,一切都可以正常编译。我在这里缺少什么?

你知道如何解决问题吗?

谢谢

最佳答案

您遇到此问题是因为 Firebase 是使用 Google Play Services 构建的,因此您不能使用高于 Firebase 版本的 Google Play Services 版本。

你能试试吗:

   

apply plugin: 'com.android.application'


android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "sk.tipos.paradox02.citaj"
minSdkVersion 11
targetSdkVersion 23
versionCode 27
versionName '2.003'
}


buildTypes {
release {
minifyEnabled false
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.release
}

debug {
debuggable true
minifyEnabled false
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
// signingConfig signingConfigs.release
}
}


productFlavors {
}

lintOptions {

checkReleaseBuilds false

}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.google.gms:google-services:3.0.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'

compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.google.firebase:firebase-crash:10.2.0'
compile 'com.google.firebase:firebase-ads:10.2.0'
compile 'com.android.support:multidex:1.0.1'

}
apply plugin: 'com.google.gms.google-services'

抱歉我的英语不好,希望对您有所帮助。

关于java - 将谷歌服务从 9.0.0 更新到 10.0.1 Android Studio 2.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42316567/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com