Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not determine the dependencies of task ':app:flutterBuildDebug' when start vscode flutter debugging

This is my environment: OS: Linux Mint 19 Tara Cinnamon 64bit (based on Ubuntu 18.04)

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.10.2, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] Android Studio (version 3.2)
[✓] VS Code (version 1.28.2)
[✓] Connected device (1 available)

• No issues found!

This error appears in debug console when I click Debug > Start Debugging in Visual Studio Code.

Launching lib/main.dart on Android SDK built for x86 in debug mode...
FAILURE: Build failed with an exception.
* Where:
Script '/home/ilhamwahabigx/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 602
* What went wrong:
Could not determine the dependencies of task ':app:flutterBuildDebug'.
> java.net.URISyntaxException: Illegal character in opaque part at index 2: E:\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\collection-1.14.11\\lib\\collection.dart

* 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 1s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Any help would be appreciated?

like image 212
iwgx Avatar asked Mar 06 '23 02:03

iwgx


1 Answers

You need to run flutter clean first. Then run your app with this command flutter run. This works for me, I hope to work for you.

like image 111
R Rifa Fauzi Komara Avatar answered Mar 10 '23 11:03

R Rifa Fauzi Komara