Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A problem occurred configuring project ':firebase_core'

I am experiencing this problem when building the mobile / android flutter app, kindly help:

[ +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)
like image 526
Joseph Wambura Avatar asked May 07 '26 22:05

Joseph Wambura


1 Answers

I think this issue is due to the deprecation of buildConfigField (from android.packageBuildConfig).

Try adding the following line to gradle.properties:

android.defaults.buildfeatures.buildconfig=true

Also, note that this is a temporary solution until the firebase_core package resolves the issue.

like image 190
Javlon Avatar answered May 09 '26 11:05

Javlon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!