gpt4 book ai didi

android - 任务 ':app:proccessDebugGoogleServices' 执行失败

转载 作者:行者123 更新时间:2023-11-29 02:35:48 24 4
gpt4 key购买 nike

我正在尝试将我的应用与 Firebase 分析相关联。我在 Gradle 任务时遇到问题:[:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]

我已经按照以下指南将 implement 'com.google.firebase:firebase-core:11.6.0' 放入 build.gradle 中。

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-core:11.6.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'
implementation 'com.google.android.gms:play-services-ads:11.4.2'
}


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

gradle 构建完成,出现 1 个错误

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 11.6.0.

有人能帮帮我吗?提前谢谢你。

最佳答案

要解决这个问题,你需要添加这行代码:

classpath 'com.google.gms:google-services:3.1.1'

build.gradle(项目)文件中的 dependencies 中。

同时更改这行代码:

implementation 'com.google.android.gms:play-services-ads:11.4.2'

implementation 'com.google.android.gms:play-services-ads:11.6.0'

关于android - 任务 ':app:proccessDebugGoogleServices' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47157744/

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