我目前正在使用 Flutter 开发一个网站,Google Chrome 向我展示了一个选项,大约两个月前它运行良好。我停止了网站上的工作,现在我回来添加一些功能,但我无法在 Chrome 上运行该项目。由于 Chrome 选项不再可用!我用的是 Mac M1。
这里扑医生-v
[!] Flutter (Channel stable, 3.19.2, on macOS 13.5 22G74 darwin-arm64, locale
en-SA)
• Flutter version 3.19.2 on channel stable at /Users/mhmdalnzy/flutter
! Warning: `dart` on your path resolves to
/opt/homebrew/Cellar/dart/3.2.4/libexec/bin/dart, which is not inside your
current Flutter SDK checkout at /Users/mhmdalnzy/flutter. Consider adding
/Users/mhmdalnzy/flutter/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7482962148 (9 weeks ago), 2024-02-27 16:51:22 -0500
• Engine revision 04817c99c9
• Dart version 3.3.0
• DevTools version 2.31.1
• If those were intentional, you can disregard the above warnings; however
it is recommended to use "git" directly to perform update checks and
upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/mhmdalnzy/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.14.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.7+0-17.0.7b1000.6-10550314)
[✓] VS Code (version 1.88.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.88.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.5 22G74 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.119
! Error: Browsing on the local area network for MM. Ensure the device is
unlocked and attached with a cable or associated with the same local area
network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code
-27)
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
我用了好几种方法都没有效果
请运行此命令来解决此错误。
打开你的 shell 配置文件
nano ~/.bash_profile
在文件末尾添加此行并保存文件:
Add the following line at the end of the file:
source ~/.bash_profile
运行此命令,然后运行 flutter doctor -v 命令以检查删除此警告。