Showing this error while trying to debug an App in Flutter

I'm recently switched to linux from windows, and I set up all flutter things in that, but when I'm trying to run, showing this error on terminal

lib/main.dart:1

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> java.net.URISyntaxException: Illegal character in opaque part at index 2: D:\\Documents\\FLUTTER\\flutter practice\\test app 1\\login_shared_pref\\build\\app\\intermediates\\flutter\\debug\\flutter_assets\\AssetManifest.json

* 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

How to fix this, or what really problem here??


Solution 1:

I faced this problem and what work for me :

  1. flutter clean
  2. flutter pub get

and make sure that

import: 'dart.js';

doesn't exist and if it deletes it