简体   繁体   English

我在 flutter 中构建项目时出现以下错误

[英]I get the following error when i build my project in flutter

C:\Users\Faheem\Desktop\dashboard>flutter build apk --profile C:\Users\Faheem\Desktop\dashboard>flutter build apk --profile

Building with sound null safety建筑用音响 null 平安

/C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart:2:8: Error: Not found: 'dart:html' import 'dart:html'; /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/storage.dart:2:8: 错误: 未找到: 'dart:html' import 'dart :html'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.6.2/lib/firebase_core_web.dart:9:8: Error: Not found: 'dart:html' import 'dart:html'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.6.2/lib/firebase_core_web.dart:9:8: 错误:未找到:'dart:html' import 'dart: HTML'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-3.3.13/lib/src/firebase_auth_web_recaptcha_verifier_factory.dart:7:8: Error: Not found: 'dart:html' import 'dart:html'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-3.3.13/lib/src/firebase_auth_web_recaptcha_verifier_factory.dart:7:8: 错误:找不到:'dart:html' import '飞镖:HTML'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:2:8: Error: Not found: 'dart:html' import 'dart:html'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-9.0.2/lib/src/utils.dart:2:8: 错误:未找到:'dart:html' import '飞镖:HTML'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.6.2/lib/firebase_core_web.dart:10:8: Error: Not found: 'dart:js' import 'dart:js'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.6.2/lib/firebase_core_web.dart:10:8: 错误:未找到:'dart:js' import 'dart: js'; ^ /C:/flutter/.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; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/js.dart:8:1: 错误:未找到:'dart:js' export 'dart: js' show allowInterop, allowInteropCaptureThis; ^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:13:8: Error: Not found: 'dart:html' import 'dart:html' as html; ^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:13:8: 错误:未找到:'dart:html' import 'dart:html' as html; ^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:6:8: Error: Not found: 'dart:html' import 'dart:html' as html; ^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:6:8: 错误:未找到:'dart:html' import 'dart:html' as html; ^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:5:8: Error: Not found: 'dart:html' ^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:5:8: 错误:未找到:'dart:html'
import 'dart:html';导入“飞镖:html”; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/js_util.dart:8:1: Error: Not found: 'dart:js_util' export 'dart:js_util'; ^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/js_util.dart:8:1: 错误:未找到:'dart:js_util' export 'dart: js_util'; ^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:79:48: Error: Type 'html.EventListener' not found. ^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/js_url_strategy.dart:79:48:错误:未找到类型“html.EventListener”。 external ui.VoidCallback addPopStateListener(html.EventListener fn);外部 ui.VoidCallback addPopStateListener(html.EventListener fn); ^^^^^^^^^^^^^^^^^^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:194:3: Error: Type 'html.Location' not found. ^^^^^^^^^^^^^^^^^^/C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:194:3: 错误:输入 'html.Location'未找到。 html.Location get _location => html.window.location; html.Location get _location => html.window.location; ^^^^^^^^^^^^^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:196:3: Error: Type 'html.History' not found. ^^^^^^^^^^^^^/C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:196:3: 错误:找不到类型 'html.History'。 html.History get _history => html.window.history; html.History get _history => html.window.history; ^^^^^^^^^^^^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:199:28: Error: Type 'html.EventListener' not found. ^^^^^^^^^^^^/C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:199:28: 错误:找不到类型 'html.EventListener'。 void addPopStateListener(html.EventListener fn) { ^^^^^^^^^^^^^^^^^^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:204:31: Error: Type 'html.EventListener' not found. void addPopStateListener(html.EventListener fn) { ^^^^^^^^^^^^^^^^^^/C:/flutter/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart:204:31 :错误:找不到类型“html.EventListener”。 void removePopStateListener(html.EventListener fn) { ^^^^^^^^^^^^^^^^^^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:7:7: Error: Type 'AnchorElement' not found. void removePopStateListener(html.EventListener fn) { ^^^^^^^^^^^^^^^^^^/C:/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:7:7 :错误:未找到类型“AnchorElement”。 final AnchorElement _urlParsingNode = AnchorElement();最后的 AnchorElement _urlParsingNode = AnchorElement(); ^^^^^^^^^^^^^ /C:/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:20:7: Error: Type 'Element' not found. ^^^^^^^^^^^^^/C:/flutter/packages/flutter_web_plugins/lib/src/navigation/utils.dart:20:7: 错误:找不到键入“元素”。 final Element?最终元素? _baseElement = document.querySelector('base'); _baseElement = document.querySelector('base'); ^^^^^^^../../runtime/vm/zone.cc: 94: error: Out of memory. version=2.16.2 (stable) (Tue Mar 22 13:15:13 2022 +0100) on "windows_x64" pid=3640, thread=8308, isolate_group=main(00000000053F0BE0), isolate=(nil)(0000000000000000) isolate_instructions=3e90000, vm_instructions=7ff6304d5460 ^^^^^^^../../runtime/vm/zone.cc: 94: error: Out of memory.version=2.16.2 (stable) (Tue Mar 22 13:15:13 2022 +0100)在“windows_x64”上 pid=3640,thread=8308,isolate_group=main(00000000053F0BE0),isolate=(nil)(0000000000000000)isolate_instructions=3e90000,vm_instructions=7ff6304d5460

pc 0x00007ff6306dd222 fp 0x000000000a36eb20 Dart_IsPrecompiledRuntime+0x21cd22 -- End of DumpStackTrace === Crash occured when compiling package:front_end/src/fasta/kernel/hierarchy/hierarchy_node.dart_ClassHierarc* What went wrong: Execution failed for task ':app:compileFlutterBuildProfile'. pc 0x00007ff6306dd222 fp 0x000000000a36eb20 Dart_IsPrecompiledRuntime+0x21cd22 -- End of DumpStackTrace === Crash occured when compiling package:front_end/src/fasta/kernel/hierarchy/hierarchy_node.dart_ClassHierarc* What went wrong: Execution failed for task ':app:compileFlutterBuildProfile'.

Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1处理 'command 'C:\flutter\bin\flutter.bat'' 以非零退出值 1 完成

  • Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. Run with --scan to get full insights.使用 --info 或 --debug 选项运行以获取更多日志 output。使用 --scan 运行以获取完整的见解。

  • Get more help at https://help.gradle.orghttps://help.gradle.org获得更多帮助

Try these commands:试试这些命令:

flutter clean
flutter packages get
dart pub get

If this doesn't solve your problem, I recommend starting a new project and moving your code and pubspec.yaml files there.如果这不能解决您的问题,我建议开始一个新项目并将您的代码和 pubspec.yaml 文件移到那里。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我运行项目时,我的 flutter 项目启动画面冻结可能是由于代码中的 firebase 错误 - My flutter project splashscreen is freezing when I run the project maybe due to firebase error in the code 当我尝试运行我的 flutter 应用程序时构建失败 - Build failed when I try to run my flutter app Flutter,当我从 firebase 消息发送通知时出现此错误并且我的应用程序冻结 - Flutter, when i send notification from firebase messaging i get this error and my app freeze 按照文章将 firebase 与我的 React Native 项目 iOS 连接后出现错误 - I got error after following the article to connect firebase with my react native project iOS 当我尝试实施该项目时,它失败了,并且出现此错误 - When I try to implement the project it fails and I get this error 我正在尝试向我的应用程序添加身份验证,但这样做时出现以下映射错误: - I am trying to add authentication to my application, and I am getting the following mapping error when doing so: 我在我的 flutter 应用程序中使用 firebase 消息传递,但是当我运行我的项目时,它显示 Stringtoken=FirebaseInstanceId.getInstance().getToken(senderId, "*"); - I'm using firebase messaging in my flutter app but when I run my project it show Stringtoken=FirebaseInstanceId.getInstance().getToken(senderId, "*"); 当我按照文档尝试将我的 Android Studio 连接到 Firebase 时出现错误 - Getting error when I am trying to connect my Android Studio to Firebase following the docs 当我使用 Flutter 构建 apk 时,我收到类似这样的错误“使用或覆盖已弃用的 API。” - When I use Flutter build apk, I get errors like this "a uses or overrides a deprecated API." 我如何在我的 flutter 应用程序中使用第二个 firebase 项目? - How can i user second firebase project in my flutter app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM