首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >已完成,但出现错误:当我第一次运行flutter时,Gradle任务assembleDebug失败,退出代码为127

已完成,但出现错误:当我第一次运行flutter时,Gradle任务assembleDebug失败,退出代码为127
EN

Stack Overflow用户
提问于 2021-05-26 15:15:46
回答 2查看 107关注 0票数 0

我在运行flutter时遇到了问题。一旦我运行flutter,它就会在可视化代码中显示以下错误,这是任何解决方案。我运行flutter医生,不知道问题是不是来自细节。

代码语言:javascript
运行
复制
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):

darwin Flutter (通道稳定,1.22.4,在macOS 11.0.1 20B50✓-x64上,区域设置为en-GB)

✓Android工具链-为Android设备开发(Android SDK版本30.0.2)

适用于iOS和macOS的✗Xcode开发

代码语言:javascript
运行
复制
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
代码语言:javascript
运行
复制
  Download at: https://developer.apple.com/xcode/download/
代码语言:javascript
运行
复制
  Or install Xcode via the App Store.
代码语言:javascript
运行
复制
  Once installed, run:
代码语言:javascript
运行
复制
    sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
代码语言:javascript
运行
复制
    sudo xcodebuild -runFirstLaunch
代码语言:javascript
运行
复制
✗ CocoaPods not installed.
代码语言:javascript
运行
复制
    CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your
代码语言:javascript
运行
复制
    plugin usage on the Dart side.
代码语言:javascript
运行
复制
    Without CocoaPods, plugins will not work on iOS or macOS.
代码语言:javascript
运行
复制
    For more info, see https://flutter.dev/platform-plugins
代码语言:javascript
运行
复制
  To install:
代码语言:javascript
运行
复制
    sudo gem install cocoapods

✓安卓工作室(4.0版)

好了!IntelliJ IDEA旗舰版(2019.1版)

代码语言:javascript
运行
复制
✗ Flutter plugin not installed; this adds Flutter specific functionality.
代码语言:javascript
运行
复制
✗ Dart plugin not installed; this adds Dart specific functionality.

✓与代码(版本1.54.1)

连接✓的设备(1个可用)

好了!医生在两个类别中发现问题。`

代码语言:javascript
运行
复制
EN

回答 2

Stack Overflow用户

发布于 2021-05-26 15:25:44

如下面这行所示

代码语言:javascript
运行
复制
**env: bash\r: No such file or directory**

您似乎已经下载了Flutter的Windows二进制文件,但您使用的是macOS。您应该下载正确的二进制文件并重新安装Flutter。请在此处查看更多信息:https://github.com/flutter/flutter/issues/27076#issuecomment-487300955

票数 0
EN

Stack Overflow用户

发布于 2021-05-26 15:21:24

你下载VS代码中的颤动和飞镖插件了吗?一旦完成本网站文章https://giancarlocode.com/flutter-tutorials/how-to-install-flutter-on-windows-10-on-visual-studio-code-and-android-studio/中提到的步骤

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67700190

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档