Build Fails on Android Studio Ladybug with Flutter 3.27.1
Describe the bug When building on Android Studio Ladybug with Flutter 3.27.1 build fails with the following message:
A problem occurred configuring project ':async_wallpaper'.
> 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/user/.pub-cache/hosted/pub.dev/async_wallpaper-2.1.0/android/build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.
If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
To Reproduce Steps to reproduce the behavior:
- Use Android Studio Ladybug and Flutter 3.27.1
- Create a new flutter project
- Add async_wallpaper as dependency
- Run
Expected behavior Build and Run should be successful
Flutter:
- 3.27.1
- stable
Dart:
- 3.6.0
Additional context Use Android Studio Ladybug with the bundled JDK or JDK 21
I just hit this error also.
i A problem occurred configuring project ':async_wallpaper'.
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'
}
I have also had this problem