How to solve Execution failed for task ':generateReleaseBuildConfig'. error in a flutter project

28 Views Asked by At

I am running flutter build apk command in my flutter project and receiving the error below

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateReleaseBuildConfig'.
> Error while evaluating property 'applicationId' of task ':generateReleaseBuildConfig'
   > Failed to calculate the value of task ':generateReleaseBuildConfig' property 'applicationId'.
      > Failed to query the value of property 'applicationId'.
         > Manifest file does not exist: C:\Repos\yousafe\android\src\main\AndroidManifest.xml

* 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://help.gradle.org

BUILD FAILED in 8s
Running Gradle task 'assembleRelease'...                            9.2s
Gradle task assembleRelease failed with exit code 1

However the AndroidManifest.XML file exists at the said location in the Android\app\src\main directory and there's nothing wrong with it;

I could also share the settings.gradle and the build.gradle files but I am sure there's nothing wrong with them.

I ran Flutter Doctor and this was the output;

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.7, on Microsoft Windows [Version 10.0.22635.3350], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.5)
[!] Android Studio (not installed)
[√] VS Code (version 1.87.2)
[√] Connected device (3 available)
[√] Network resources

! Doctor found issues in 1 category.

and this one issues is because I prefer to use VsCode to Android Studio so I uninstalled it. Everything seems to checkout. I would appreciate any pointers on to what exactly I am missing.

0

There are 0 best solutions below