gpt4 book ai didi

google-chrome - 如何在适用于 Linux (Debian 10) 的 Windows 子系统上开发 Flutter Web 应用程序

转载 作者:行者123 更新时间:2023-12-04 13:13:39 27 4
gpt4 key购买 nike

我想在适用于 Linux (Debian 10) 的 Windows 子系统上开发 Flutter Web 应用程序。我遵循了这个指示。 https://flutter.dev/docs/get-started/codelab-web

flutter channel beta
flutter upgrade
flutter config --enable-web

首先,我在终端中输入了这些命令,它们都运行良好。

其次,我尝试了 flutter doctor 命令,这就是结果。

Downloading android-arm-release/linux-x64 tools...                  2.1s
Downloading android-arm64-profile/linux-x64 tools... 1.8s
Downloading android-arm64-release/linux-x64 tools... 1.6s
Downloading android-x64-profile/linux-x64 tools... 1.6s
Downloading android-x64-release/linux-x64 tools... 1.5s
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Linux, locale en_US.UTF-8)
[✗] 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, set ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[!] Android Studio (not installed)
[✓] Connected device (1 available)

! Doctor found issues in 3 categories.

我开发网络应用,所以我不需要Android toolchainAndroid Studio,但我需要Chrome

我认为有两种方式。

  1. 在 WSL 上安装 Chrome => 我搜索了 Internet,但找不到这样做的方法。

  2. Windows 10 上的用户 Chrome(非 WSL)=> 我在网上搜索(例如:flutter chrome "windows subsystems for linux"),但找不到方法这样做。

你能给我一些建议吗?

最佳答案

尝试将环境变量 CHROME_EXECUTABLE 设置为安装在 Windows 上的 Chrome 可执行文件的路径,以便 Flutter 可以找到它。

关于google-chrome - 如何在适用于 Linux (Debian 10) 的 Windows 子系统上开发 Flutter Web 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62293857/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com