I after a long time was working on one of my projects so I updated my flutter code and packages too. I started receiving error: A problem occurred configuring project for "package name". At first, it was for cloud firestore and firebase ones but then I reinstalled firebase, so that got solved then I got for shareplus and few other packages that solved by adding namespace in the specific build.gradle of the package but I am still receiving for other packages one by one. Right now I have it for video_player package.
The error looks somewhat like this in most cases
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':video_player_android'.
> 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.
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:
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https:
BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1
What I have tried:
I tried same solution for this but I could not solve it. I have already tried some other ways such as:
Removing the package "namespace" from all androidxmls Adding namespace in my app level android file Updating dependicies to : classpath 'com.android.tools.build:gradle:8.2.0' // Updated to a newer version classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.4.0' // Google Services plugin
Installed Java 17, added this line in the gradle.properties: org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
Added namespace in subproject folder too recently in the global buildgradle
What else can I do and how can I make sure this error is solved globally?