I'm encountering an issue with the latest version of the background_location package. When I try to build my Flutter project, the build fails with the following error:
A problem occurred configuring project ':background_location'.
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. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
It appears that the namespace is not specified in the module's build file as required by the latest Android Gradle Plugin (AGP). According to the documentation, the namespace needs to be defined explicitly, starting from AGP version 7.0.0 and onwards. The link provided in the error suggests migrating the package attribute from the AndroidManifest.xml to the build.gradle file.
Since I don't have direct access to the package to apply the fix, and forking the package is not ideal, could you please address this issue in an upcoming release by adding the necessary namespace declaration in the build.gradle file?
Here is the error message in more detail:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':background_location'.
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. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
Steps to reproduce:
Add background_location to a Flutter project using the latest Android Gradle Plugin.
Run flutter build apk.
The build fails with the above error.
Environment:
Flutter version: [Your Flutter version]
Android Gradle Plugin: 8.0.0+
Kotlin version: 1.8.22
background_location version: [Latest version]
Thank you in advance for your assistance!
Hello,
I'm encountering an issue with the latest version of the background_location package. When I try to build my Flutter project, the build fails with the following error:
A problem occurred configuring project ':background_location'.
Since I don't have direct access to the package to apply the fix, and forking the package is not ideal, could you please address this issue in an upcoming release by adding the necessary namespace declaration in the build.gradle file?
Here is the error message in more detail:
FAILURE: Build failed with an exception.
Add background_location to a Flutter project using the latest Android Gradle Plugin. Run flutter build apk. The build fails with the above error. Environment:
Flutter version: [Your Flutter version] Android Gradle Plugin: 8.0.0+ Kotlin version: 1.8.22 background_location version: [Latest version] Thank you in advance for your assistance!