【问题标题】:Firebase crashlytics fails build after updating android gradle plugin to 7.0.2将 android gradle 插件更新到 7.0.2 后,Firebase crashlytics 构建失败
【发布时间】:2021-11-17 19:40:17
【问题描述】:

我正在开发多口味的安卓应用 在将 Android Gradle 插件更新为 7.0.2 版本(从“4.1.1”开始)以访问新的变体 API 后,我在应用构建期间收到以下错误:

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':app:injectCrashlyticsMappingFileIdRandstadAccDebug' (type 'InjectMappingFileIdTask').
- Type 'com.google.firebase.crashlytics.buildtools.gradle.tasks.InjectMappingFileIdTask' property 'mappingFileId' of mutable type 'org.gradle.api.provider.Property' is writable.

Reason: Properties of type 'org.gradle.api.provider.Property' are already mutable.

Possible solution: Remove the 'setMappingFileId' method.

Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.
- Type 'com.google.firebase.crashlytics.buildtools.gradle.tasks.InjectMappingFileIdTask' property 'resourceFile' of mutable type 'org.gradle.api.file.RegularFileProperty' is writable.

Reason: Properties of type 'org.gradle.api.file.RegularFileProperty' are already mutable.

Possible solution: Remove the 'setResourceFile' method.

Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.

* Try:
Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.

* Get more help at https://help.gradle.org

我使用的是最新版本的 firebase BOM 28.4.1。

有什么办法可以解决这个问题吗?

【问题讨论】:

    标签: android firebase gradle crashlytics


    【解决方案1】:

    就我而言,解决方法是将 crashlytics 插件更新到当前最新版本:2.7.1

    【讨论】:

      猜你喜欢
      • 2015-02-06
      • 1970-01-01
      • 2021-11-14
      • 2021-03-15
      • 2015-04-11
      • 2023-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多