Flutter strange depfile error. Debug button disappearing in vs code

27 views Asked by At

I am getting error while running my flutter app. I was working on my app and it was working perfectly fine but then out of nowhere, my app stopped working. I thought of running it again but then I started to encounter strange error. Also the debug button in vs code was disappeared.

It was a normal toDo app which was using hive to store data for todo. The app was perfectly running fine untill I added hive.delete() function in floatinActionBar button just to check if it deletes and then I could not hot reload or restart. out of a sudden, my debug button in vs code disappeared and I could not run the app even with flutter run command.

This is my error:

Invalid depfile: D:\Shourya's Folder\Mobile Development\Flutter\todo_app.dart_tool\flutter_build\c16af2248f48b25154ee097cb0bd9d03\kernel_snapshot.d Invalid depfile: D:\Shourya's Folder\Mobile Development\Flutter\todo_app.dart_tool\flutter_build\c16af2248f48b25154ee097cb0bd9d03\kernel_snapshot.d Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ajs_interop_unsafe; 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:732:37) #2 writeDepfile (package:vm/kernel_front_end.dart:870:21) #3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:676:9) #4 starter (package:frontend_server/starter.dart:102:12) #5 main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13:14)

Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. Process 'command 'C:\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 21s Running Gradle task 'assembleDebug'... 23.1s Exception: Gradle task assembleDebug failed with exit code 1

I tried running

flutter upgrade

I could then run other apps perfectly fine but not the original one I got error while working on. I tried building another flutter app and copy pasting the code files but the error continued.

0

There are 0 answers