Click here to Skip to main content
15,904,652 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
   > Namespace not specified. Specify a namespace in the module's build file. See 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 for general information about using the AGP Upgrade Assistant.

* 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

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 '' // Updated to a newer version classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath '' // Google Services plugin

Installed Java 17, added this line in the

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?
[no name] 18-Jan-24 13:39pm    
In those cases, I create the equivalent of a "hello world" app to see if my thinking is right. You seem to have embarked on an upgrade path that had no real plan.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900