Flutter Web 配置 Edge 浏览器

Flutter About 1,294 words

错误信息

➜  ~ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.5, on macOS 12.6.6 21G646 darwin-x64, locale zh-Hans-CN)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google
    Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

原因

本机没有安装Chrome,装的是Microsoft Edge

配置环境变量

配置CHROME_EXECUTABLE环境变量。

export CHROME_EXECUTABLE="/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"

再次诊断

➜  ~ flutter doctor -v
[✓] Flutter (Channel stable, 3.13.5, on macOS 12.6.6 21G646 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.13.5 on channel stable at /Users/fendoudebb/Tool/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 12fccda598 (4 days ago), 2023-09-19 13:56:11 -0700
    • Engine revision bd986c5ed2
    • Dart version 3.1.2
    • DevTools version 2.25.0

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.6.6 21G646 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Microsoft Edge 117.0.2045.40
Views: 1,577 · Posted: 2023-09-28

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh