flutter - VS 代码无法连接到 Chrome 调试端口:37095
问题描述
我通过以下方式安装了 Flutter 和 VS Code:
$ sudo snap install --classic code
$ sudo snap install --classic flutter
$ tail -n 1 ~/.bashrc
export CHROME_EXECUTABLE="/usr/bin/chromium"
$ flutter doctor -v
[✓] Flutter (Channel stable, 2.2.1, on Linux, locale en_AU.UTF-8)
• Flutter version 2.2.1 at /home/debian/snap/flutter/common/flutter
• Framework revision 02c026b03c (4 months ago), 2021-05-27 12:24:44 -0700
• Engine revision 0fdb562ac8
• Dart version 2.13.1
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = /usr/bin/chromium
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Chromium 90.0.4430.212 built on Debian 11.0, running on Debian 11.0
! Doctor found issues in 2 categories.
我可以在终端中启动 Flutter 应用程序。
但是,在 VS 代码下我得到Unable to connect to Chrome debug port: 37095
我错过了什么?
解决方案
解决方法是必须通过 SNAP 安装 chromium、flutter 和 VS code。
推荐阅读
- python - 在字典中查找重复值并仅在具有相同键的值不同时打印它们
- node.js - 无法将数据从 React Js 发布到 Node js
- kubernetes - 整个命名空间的 Kubernetes 默认 QoS
- spring-boot - Angular 5 http.post 授权标头未设置
- java - SeekBar - 播放时更新进度时 MediaPlayer 滞后
- c++ - C ++为具有引用成员变量但将引用作为参数传递给基类的类创建构造函数(副本)
- eloquent - Eloquent where on relationship
- wpf - 当我应用此样式时,为什么我的功能区菜单按钮弹出窗口消失了?
- java - 无法注册客户端 - Spring Boot Admin 2.0.2
- jakarta-ee - 实体 JPA Hibernate 错误