这是我的环境:操作系统为Linux Mint 19 Tara Cinnamon 64位(基于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!
当我在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)
需要帮忙吗?
E:\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\collection-1.14.11\\lib\\collection.dart
路径存在吗?我不确定该路径是否在Linux中通常存在。 - selharxets/media/ilhamwahabigx/Work/flutter
。我刚才才意识到为什么会引用那里。 - iwgx