I was following a simple tutorial on Youtube it was about routes and maps in flutter. I created simple routes and tried the navigator.pushNamed function. The code itself doesn't have any error, however when I try running it on my AVD, it shows a long error which I am not quite sure what it's about.
'''
Invalid depfile: C:\Users\suyas\AndroidStudioProjects\world_time\.dart_tool\flutter_build\633c5927f281cdb2910d4c731b292e86\kernel_snapshot.d
Invalid depfile: C:\Users\suyas\AndroidStudioProjects\world_time\.dart_tool\flutter_build\633c5927f281cdb2910d4c731b292e86\kernel_snapshot.d
../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/js-0.6.3/lib/js.dart:8:1: Error: Not found: 'dart:js'
export 'dart:js' show allowInterop, allowInteropCaptureThis;
^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatabl
e-uri:
dart%3Ajs; message=StandardFileSystem only supports file:* and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7)
#1 asFileUri (package:vm/kernel_front_end.dart:599:37)
#2 writeDepfile (package:vm/kernel_front_end.dart:738:21)
<asynchronous suspensio
n>
#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:558:9)
<asynchronous suspension>
#4 starter (pa
ckage:flutter_frontend_server/server.dart:180:12)
<asynchronous suspension>
#5 main (fil
e:///C:/b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.da
rt:13:24)
<asynchronous suspension>
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* 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 9s
Exception: Gradle task assembleDebug failed with exit code 1
'''
Have you tried running flutter clean and flutter pub get to rebuild the references used in the Flutter project? Rebuilding the references used in the project usually solves the issue as mentioned in this post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With