【问题标题】:Flutter run: No supported devices connected error on MacFlutter 运行:Mac 上没有连接支持的设备错误
【发布时间】:2021-06-05 16:09:30
【问题描述】:

我似乎无法再运行我的颤振项目了。我创建了一个新的空的,仍然一样:我得到同样的错误

未连接受支持的设备。 找到了以下设备,但此项目不支持: Chrome(网络) • chrome • web-javascript • Google Chrome 88.0.4324.192 如果您希望您的应用程序在 Web 上运行,请考虑运行 flutter create . 以 为这些平台生成项目。

它之前完美运行!我用fluter doctor检查是否一切正常

[✓] Flutter (Channel stable, 2.0.1, on macOS 11.2.2 20D80 darwin-arm, locale
en-GB)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
✗ Android licenses not accepted.  To resolve this, run: flutter doctor
  --android-licenses
[!] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS
  development.
  Download at: https://developer.apple.com/xcode/download/
  Or install Xcode via the App Store.
  Once installed, run:
    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
    sudo xcodebuild -runFirstLaunch
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.53.2)
[✓] Connected device (1 available)

我在 VSCode 中运行我的项目并且之前工作得非常好...... Flutter 已经过时了。

当我使用 flutterdeviced 时,IOS 模拟器不再出现 :(

【问题讨论】:

    标签: flutter visual-studio-code


    【解决方案1】:

    接受许可并重试。也许他们改变了协议 运行:flutter doctor --android-licenses

    【讨论】:

    • 嗨,我这样做了,但问题不在于 android 模拟器。我觉得flutter看不到IOS模拟器的问题
    • 你试过建议sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xcodebuild -runFirstLaunch吗?
    • 是的,我做到了,这就是我得到的 xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'
    【解决方案2】:

    export PATH="$PATH://Users/USERNAME/dev/flutter/bin"

    USERNAME= which user
    
    dev = where flutter is
    

    颤振医生--android-licenses

    【讨论】:

    • 由于您的回答可能会解决问题,请添加一些关于它的作用的解释,而不是仅仅抛出一些代码。
    猜你喜欢
    • 2020-06-21
    • 2018-08-11
    • 2020-07-12
    • 2018-08-09
    • 1970-01-01
    • 1970-01-01
    • 2012-10-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多