Skip to content

Bug: Build fails on AGP 7.0+ due to missing namespace #142

@yen-kadokawa

Description

@yen-kadokawa

Description

When using rollbar_flutter (v1.5.1) in a Flutter project that targets Android Gradle Plugin (AGP) 7.0 or later, the build fails with the following error:

A problem occurred configuring project ':rollbar_flutter'.
> 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: rollbar_flutter/android/build.gradle.

Expected Behavior

The plugin should compile successfully on AGP 7.0+ by including a proper namespace declaration in android/build.gradle.

Proposed Fix

Add the following to rollbar_flutter/android/build.gradle:

android {
    namespace 'com.rollbar.flutter'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions