我试图在 android 模拟器中运行该应用程序,但此错误不断弹出。
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 33s
Exception: Gradle task assembleDebug failed with exit code 1
我在没有帮助的情况下尝试了以下内容。
flutter channel stable
flutter upgrade --force
flutter pub cache repair
flutter clean
以防万一有人可以提供帮助。
原文由 sserunjogi 发布,翻译遵循 CC BY-SA 4.0 许可协议
试试这个:
由于 .gitignore 文件,您的 git 更改中不应有任何更改
再次打开 Android Studio
转到 File->Invalidate Caches/Restart,然后使缓存无效并重新启动
如果您的项目结构已损坏,请转到:文件 - >关闭项目,关闭项目并重新打开它,它应该恢复正常。
颤振酒吧得到
飞镖酒吧得到