gpt4 book ai didi

android - 无法确定任务 ':app:uploadCrashlyticsMappingFileRelease' 与 Google 版本 4.3.9 的依赖关系

转载 作者:行者123 更新时间:2023-12-05 04:46:43 60 4
gpt4 key购买 nike

下一个问题发生在构建发布 APK/Bundle 时

它发生在最新版本的 'com.google.gms:google-services:4.3.9' 上,它适用于 'com.google.gms:google-services :4.3.8'

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:uploadCrashlyticsMappingFileRelease'.
> Could not create task ':app:processReleaseGoogleServices'.
> DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context.

build.gradle(应用程序):

plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

...
// Firebase
implementation platform('com.google.firebase:firebase-bom:28.3.0')
implementation 'com.google.firebase:firebase-crashlytics'

...

build.gradle(root):

buildscript {
ext.kotlin_version = "1.5.21"
repositories {
google()
mavenCentral()
maven {
url "https://jitpack.io"
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.9'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
}
}

gradle插件版本:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip

Studio 版本:Android Studio Arctic Fox | 2020.3.1

可能是什么问题?

最佳答案

在根级别 build.gradle 中升级 google-services plugin

classpath 'com.google.gms:google-services:4.3.10' // change version here

此问题在 4.3.9 版本中面临,并已在 4.3.10 中修复

发现于:- https://firebase.google.com/support/release-notes/android#google-services_plugin_v4-3-10

关于android - 无法确定任务 ':app:uploadCrashlyticsMappingFileRelease' 与 Google 版本 4.3.9 的依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68742990/

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