Skip to content

🐛 Firebase packages don't fully support AGP 8 #11266

@Zazo032

Description

@Zazo032

🐛 Bug report

While trying to upload our app to AGP 8, we were getting error logs like this:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':firebase_analytics'.
> defaultConfig contains custom BuildConfig fields, but the feature is disabled.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 914ms

The following code snippet fixed the issue for us when building locally. In each plugin's android/build.gradle file, you have to add:

android {
    buildFeatures {
        buildConfig = true
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: androidIssues / PRs which are specifically for Android.resolution: fixedA fix has been merged or is pending merge from a PR.type: bugSomething isn't workingtype: infrastructureImprovements to the codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions