Launching lib\main.dart on LS 5016 in debug mode... Running Gradle task 'assembleDebug'...
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 download builder.jar (com.android.tools.build:builder:3.5.0) Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.5.0/builder-3.5.0.jar'. Premature end of Content-Length delimited message body (expected: 8174407; received: 2359280 Could not download bundletool.jar (com.android.tools.build:bundletool:0.9.0) Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.9.0/bundletool-0.9.0.jar'. Premature end of Content-Length delimited message body (expected: 5248142; received: 4456416
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 27m 34s Finished with error: Gradle task assembleDebug failed with exit code 1
When I encounter
Could not resolve all artifacts for configuration ':classpath'
, I usually invalidate cache , restart, clean and rebuild project. Strangely, the problem is solved just like that.Anyway, if you want to add more dependencies, you can choose File > Project Structure > Dependencies.
Hope it help!