-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
When using this project as dependency in modern flutter project this error occurs:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':image_compression_flutter'.
> 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.
This issue can occur often because many users update their dependencies using AGP upgrade assistant (which is very noisy) to AGP version 8+
In modern flutter templates, this property automatically added to gradle configuration, but in most places developers have to update it manually
Great example of how it is possible to accomplish is this commit in flutter_image_compress package
Metadata
Metadata
Assignees
Labels
No labels