Home > Mobile >  how to solve Debug messages in flutter dart
how to solve Debug messages in flutter dart

Time:08-29

i try to run my app in flutter and it's giving me this error please how to solve it's been 2 days I am trying and if you need to see a code just tell me in comment:

    Invalid depfile: D:\coding\flutter\newapp\appdot\.dart_tool\flutter_build\3c16b6c24fbe897dc1d0d975777a64d2\kernel_snapshot.d
: Error: Not found: 'dart:html'
lib/home_page.dart:1
import 'dart:html';
       ^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart:html; 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:652:37)
#2      writeDepfile (package:vm/kernel_front_end.dart:792:21)
<asynchronous suspension>
#3      FrontendCompiler.compile (file:///C:/b/s/w/ir/cache/builder/sdk/pkg/frontend_server/lib/frontend_server.dart:615:9)
<asynchronous suspension>

#4      starter (file:///C:/b/s/w/ir/cache/builder/sdk/pkg/frontend_server/lib/frontend_server.dart:1433:12)
<asynchronous suspension>

#5      main (file:///C:/b/s/w/ir/cache/builder/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:10:14)
<asynchronous suspension>
4

FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

CodePudding user response:

remove import html.dart in the dart file causing the error

CodePudding user response:

dart:html is a web package only. You can't use it when building for android. You can try to use the universal_html package instead, though it might not have the functionality you want.

  • Related