Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A problem occurred evaluating root project 'android' in flutter gradle

FAILURE: Build failed with an exception.

  • Where: Script 'C:\Users\Admin\Downloads\flutter_windows_3.7.11-stable\old_version_2.5\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 763

  • What went wrong: A problem occurred evaluating root project 'android'.

A problem occurred configuring project ':app'. Could not create task ':app:packLibsflutterBuildDebug'. > No signature of method: org.gradle.api.tasks.bundling.Jar.destinationDir() is applicable for argument types: (File) values: [C:\Users\Admin\AndroidStudioProjects\amity-incubator-app\build\app\intermediates\flutter\debug]

  • 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 6s Exception: Gradle task assembleDebug failed with exit code 1

I am trying to run a app which was made in 2021 in flutter in older version packages and sdk version. I have upgraded 90+ packages versions but some got discontinued and I tried upgrading the version of gradle property from older to newer.

How to solve to error

like image 745
Nitin Singh Avatar asked Dec 04 '25 23:12

Nitin Singh


1 Answers

  1. clean the project
  2. go to "File" -> "Invalidate Caches / Restart" check all boxes and then it will restarted
  3. update gradle by going gradle and in top right you will see "open for editing in android studio"
  4. search for gradle version and update it but be carefull not above 8 beacause it has some issues just stable ok
  5. it will automatically download the required gradle and also change in wrapper the gradle version
like image 177
shafqat khan Avatar answered Dec 07 '25 17:12

shafqat khan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!