Home > Software design >  assembleRelease task failed when building a Flutter project
assembleRelease task failed when building a Flutter project

Time:11-24

Building with sound null safety

Running Gradle task 'assembleRelease'...

FAILURE: Build failed with an exception.

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

Could not resolve all artifacts for configuration ':classpath'. Could not find builder-4.1.0.jar (com.android.tools.build:builder:4.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/4.1.0/builder-4.1.0.jar Could not find bundletool-0.14.0.jar (com.android.tools.build:bundletool:0.14.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.14.0/bundletool-0.14.0.jar

  • 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 Running Gradle task 'assembleRelease'... 10.9s Gradle task assembleRelease failed with exit code 1 Process finished with exit code 1

CodePudding user response:

Try to build your project with following three steps:

1- flutter build apk --debug

2- flutter build apk --profile

3- flutter build apk --release

  • Related