flutter - Flutter Web 错误消息不可点击
问题描述
我在 Android Studio 和 VS Code 中都收到了部署到 Web 时不可点击的错误消息。在下面的屏幕截图中,我并排设置了 Android Studio 和 VS Code。在 Android Studio 中,您可以看到来自 JS 代码的 HTTP 链接正在工作,但不是更有用的 Dart 代码链接。特别是突出显示的行packages/afi_desktop_app/ui/screen/ecg_chart/ecg_chart_repo.dart 24:5
会很有用,因为那是我编写的代码。
请注意,这是我最初为桌面使用创建的代码。我现在已经升级并更改了代码库以使用 web。还值得一提的是,在从头开始新的 Counter App Flutter 示例应用程序时,我似乎遇到了同样的问题。
[✓] Flutter (Channel stable, 2.0.4, on macOS 11.2.1 20D74 darwin-arm, locale
en-NL)
• Flutter version 2.0.4 at /opt/homebrew/Caskroom/flutter/1.22.5/flutter
• Framework revision b1395592de (13 days ago), 2021-04-01 14:25:01 -0700
• Engine revision 2dce47073a
• Dart version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/gerard/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.55.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.21.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 11.2.1 20D74 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.128
解决方案
推荐阅读
- angular - HttpInterceptor 不适用于延迟加载的模块
- json - 在 spark scala 中删除 json 解析中的重复属性
- python - Chromedriver/Selenium 问题
- java - 使用 .endsWith() 语句进行条件检查
- spring - 使用 Spring Data JPA 获取时双向 OneToMany 关系中的重复实体
- regex - Mongo DB 按日期搜索事件
- javascript - JavaScript:需要输入元素以根据输入的数据更改选项
- python - 反复收到消息:您正在通过 HTTPS 访问开发服务器,但它只支持 HTTP
- ruby-on-rails - 命名作业是一个好习惯吗?
- python - scipy.integrate.solve_bvp 用于 Neumann 边界条件?