gpt4 book ai didi

android - Google 服务版本冲突

转载 作者:行者123 更新时间:2023-11-29 19:10:57 31 4
gpt4 key购买 nike

我正在尝试修复此 Google 服务版本错误。我之前一直在使用 Google 服务版本 10.2.4 进行 Google 登录。现在,由于我想将 Geofencing API 集成到我的应用程序中,根据我的研究,它至少需要 11.0.0 的最低版本。但是,我无法弄清楚问题到底是什么。请在下面找到我得到的错误

Error:Execution failed for task ':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 10.2.4.

请在下面找到我的应用程序 build.gradle 文件

build.gradle(app)

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.project.group.projectga"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resValue "string", "google_maps_key",
(project.findProperty("GOOGLE_MAPS_API_KEY") ?: "")
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.mikepenz:materialdrawer:5.1.6@aar') {
transitive = true
}

//Added this for Visual Gallery implementation - Start
//Added this for Visual Gallery implementation - End

compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.firebase:firebase-auth:10.2.4'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.satsuware.lib:usefulviews:2.3.6'
compile 'com.google.firebase:firebase-database:10.2.4'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.google.android.gms:play-services-auth:11.0.0'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.google.android.gms:play-services-location:11.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.mikepenz:google-material-typeface:2.2.0.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
compile 'com.github.medyo:fancybuttons:1.6'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.github.yesidlazaro:GmailBackground:1.2.0'
compile 'com.android.support:support-annotations:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
}

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

还有我的 build.gradle(Project) 文件。

build.gradle(项目)

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

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

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

allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}

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

看了很多Stack Overflow的回答,最后都说要加上google服务的插件。我从一开始就添加了插件,但似乎不适用于此。我正在尝试集成要求 Google 服务版本至少为 11.0.0 的 Geofencing API,但我无法做到这一点。

最佳答案

将您的 firebasecom.google.android.gms 模块移动到相同版本且至少为 11.0.0:

compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.google.firebase:firebase-database:11.0.2'
compile 'com.google.firebase:firebase-storage:11.0.2'
compile 'com.google.android.gms:play-services-auth:11.0.2'
compile 'com.google.android.gms:play-services-maps:11.0.2'
compile 'com.google.android.gms:play-services-location:11.0.2'

关于android - Google 服务版本冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45360438/

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