【发布时间】:2026-02-08 09:25:02
【问题描述】:
我在运行 Flutter 时遇到问题。一旦我运行颤振,它会在可视代码上显示以下错误,对此的任何解决方案。我跑flutter doctor,不知道是不是细节问题。
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling
software rendering with "--enable-software-rendering".
Launching lib/main.dart on sdk gphone x86 in debug mode...
**env: bash\r: No such file or directory**
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 2.9s
*Exception: Gradle task assembleDebug failed with exit code 127*```
Just in case you need the Flutter Doctor here is it:
```Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B50 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✗] 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
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your
plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[✓] Android Studio (version 4.0)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.54.1)
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.```
【问题讨论】:
标签: android ios flutter visual-studio-code