Skip to content

Add Namespace Support for Android Gradle Plugin (AGP) 8.x Compatibility #391

Description

@dschandrasekara

The flutter_mapbox_navigation package is not compatible with Android Gradle Plugin (AGP) 8.x due to the absence of a namespace property in the android/build.gradle file. Starting with AGP 8.0.0, the namespace property is required for all Android modules to decouple the internal namespace from the AndroidManifest.xml file.

Steps to Reproduce:

  1. Add flutter_mapbox_navigation version 0.2.2 to a Flutter project.
  2. Update the project's Android Gradle Plugin to version 8.x (e.g., 8.1.1 or later).
  3. Attempt to sync or build the project.

Observed Behavior:
The build fails with the following error:

A problem occurred configuring project ':flutter_mapbox_navigation'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file: /Users/<username>/.pub-cache/hosted/pub.dev/flutter_mapbox_navigation-0.2.2/android/build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

Expected Behavior:
The project should build successfully with AGP 8.x when using the flutter_mapbox_navigation package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions