Chrome 没有出现在 vscode 中.Manjaro Linux [英] Chrome not showing up in vscode. Manjaro Linux
问题描述
我在 Manjaro.我已经从 AUR
安装了 google-chrome 并且它当从终端执行时,出现在 flutter doctor 和 flutter devices 中.问题是当我从 vscode 运行 flutter doctor 时,它说
i'm on Manjaro. i've install google-chrome from AUR
and it shows up in flutter doctor , flutter devices when executed from terminal. the problem is when i run flutter doctor from vscode it says
[✗] Chrome - 为网络开发(在 google-chrome 中找不到 chrome 可执行文件)!找不到 Chrome.尝试将 CHROME_EXECUTABLE 设置为 Chrome 可执行文件.
[✗] Chrome - develop for the web (Cannot find chrome executable at google-chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
推荐答案
首先需要切换主频道
flutter channel master
然后运行
flutter upgrade
通过运行启用 Web 支持
Enable Web support by running
flutter config --enable-web
运行找到chrome的安装路径
Find installation path of chrome by running
which chrome
将环境变量设置为 chrome 的安装路径.如果您使用 AUR 安装,它将位于/opt/google/chrome/chrome
set an Environment variable to chrome's installation path. If your installed using AUR it will in /opt/google/chrome/chrome
export CHROME_EXECUTABLE=/opt/google/chrome/chrome
终于运行了
flutter devices
您可以将 chrome 视为已连接的设备.
You can see chrome as a connected device.
这篇关于Chrome 没有出现在 vscode 中.Manjaro Linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!