Error when adding Google Mobile Ads SDK to Flutter

76 Views Asked by At

I'm encountering an issue when trying to integrate the Google Mobile Ads SDK into my Flutter project. When I add the dependency to my pubspec.yaml file and try to build the project, I get the following error:

A problem occurred configuring project ':google_mobile_ads'.
> 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.

I have followed the steps outlined in the documentation and from the Youtube tutorial [video][1] but I can't seem to resolve this issue. Can anyone provide guidance on how to fix this error?

Additional Information:

Flutter version: 3.13.1, Android Studio version: 2022.3 Google Mobile Ads SDK version:3.0.0

0

There are 0 best solutions below