Error building APK after adding flutter_map_location_marker – Namespace not specified in flutter_compass
Describe the bug When I add the flutter_map_location_marker package to my Flutter project and try to build the APK, I receive an error related to the flutter_compass package configuration. The error message suggests that a namespace is not specified in the module's build.gradle file.
vbnet 複製程式碼
- What went wrong: A problem occurred configuring project ':flutter_compass'.
Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. Namespace not specified. Please specify a namespace in the module's build.gradle file like so:
android {
namespace 'com.example.namespace'
}
If the package attribute is specified in the source AndroidManifest.xml, it can be migrated automatically to the namespace value in the build.gradle file using the AGP Upgrade Assistant; please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.
To Reproduce Steps to reproduce the behavior:
Add flutter_map_location_marker package in pubspec.yaml. Run the command flutter build apk. The build process fails with the error mentioned above. Expected behavior The APK should build successfully without any namespace-related issues.
I think the flutter_compass library is incompatible, since this library is outdated, I opened a new issue and I'm still looking for a solution.
Since #131 has longer discussion, I am closing this. Please continue there.