构建发布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(根目录):
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
工作室版本:Android Studio Arctic Fox | 2020.3.1
可能会有什么问题?