Skip to content

[url_launcher][Android] Cannot find symbol BuildConfig on AGP 8.0+ #128204

@MateusRodCosta

Description

@MateusRodCosta

Details

This happen when using latest url_launcher (6.1.11) with latest url_launcher_android (6.0.35) with AGP 8.x.x (8.0.2, in this case).

Basically, the Android version of an app using this plugin isn't able to build by default due to not finding the BuildConfig class.
This is due to AGP 8.0 setting the default value of android.defaults.buildfeatures.buildconfig to false.

This can be fixed by setting android.defaults.buildfeatures.buildconfig back to true in the app, but should ideally be fixed by enabling only for this plugin's module with:

android {
  buildFeatures {
    buildConfig true
  }
}

Target Platform: Android
Target OS version/browser: any
Devices: any

Logs

Logs
error: cannot find symbol
    if (BuildConfig.DEBUG) {
        ^
  symbol:   variable BuildConfig
  location: class UrlLauncher

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: crashStack traces logged to the consolefound in release: 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: url_launcherPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions