gpt4 book ai didi

android - 配置项目 ':firebase_core' 时出现问题

转载 作者:行者123 更新时间:2023-12-02 15:44:31 30 4
gpt4 key购买 nike

我在构建移动/android flutter 应用程序时遇到了这个问题,请帮助:

[ +271 ms] > Configure project :firebase_core
[ ] Evaluating project ':firebase_core' using build file 'C:\Users\kelsey\AppData\Local\Pub\Cache\hosted\pub.dev\firebase_core-2.4.0\android\build.gradle'.
[ ] Using default execution profile
[ ] Could not execute [class org.jetbrains.kotlin.gradle.plugin.statistics.KotlinBuildStatHandler.buildFinished]
[ +2 ms] FAILURE: Build failed with an exception.
[ +3 ms] * What went wrong:
[ ] A problem occurred configuring project ':firebase_core'.
[ +1 ms] > com.android.builder.errors.EvalIssueException: defaultConfig contains custom BuildConfig fields, but the feature is disabled.
[ +1 ms] * Try:
[ +4 ms] > Run with --debug option to get more log output.
[ +1 ms] > Run with --scan to get full insights.
[ ] * Exception is:
[ ] org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':firebase_core'.

[ ] Caused by: com.android.builder.errors.EvalIssueException: defaultConfig contains custom BuildConfig fields, but the feature is disabled.
[ ] at com.android.builder.errors.IssueReporter.reportError(IssueReporter.kt:113)

最佳答案

我认为这个问题是由于 buildConfigField 的弃用造成的(来自 android.packageBuildConfig)。

尝试将以下行添加到 gradle.properties:

android.defaults.buildfeatures.buildconfig=true

另请注意,在 firebase_core 包解决问题之前,这是一个临时解决方案。

关于android - 配置项目 ':firebase_core' 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74763220/

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