gpt4 book ai didi

Android Kotlin DSL - Unresolved reference : firebaseAppDistribution

转载 作者:行者123 更新时间:2023-12-02 13:43:48 24 4
gpt4 key购买 nike

我刚刚将我的 Andoroid 项目的构建系统从 Groovy 迁移到 Kotlin DSL。迁移时,我无法解决 build.gradle.kts 中的 firebaseAppDistribution { .. }。

FAD 的插件和类路径已经被应用。

plugins {
id("com.android.application")
//id("com.google.firebase.appdistribution") //I've tried it here but "Plugin not found"
kotlin("android")
kotlin("android.extensions")
kotlin("kapt")
id("com.google.gms.google-services")
}


apply(plugin = "com.google.firebase.appdistribution")


buildscript {
repositories {
google()
}
dependencies {
classpath("com.google.firebase:firebase-appdistribution-gradle:1.3.1")
}
}

.
.
 productFlavors {
create("dev") {
firebaseAppDistribution {
serviceCredentialsFile = "xxx.json"
groups = "xx"
}
}
}

.
.

**Unresolved reference: firebaseAppDistribution**


我如何解决它 ?

最佳答案

你可以使用:

   import com.google.firebase.appdistribution.gradle.AppDistributionExtension

productFlavors {
create("dev") {
configure<AppDistributionExtension> {
serviceCredentialsFile = "path/to/serviceAccountKey.json"
releaseNotes="you release note"
...
}
}
}

关于Android Kotlin DSL - Unresolved reference : firebaseAppDistribution,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60968795/

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