简体   繁体   English

如何在 flutter 中修复此错误“app:compiledebugjavawithjavac”

[英]How to fix this error 'app:compiledebugjavawithjavac ' in flutter

I have installed flutter and vscode also I have used android SDk comand line tool and Java Jdk8.我已经安装了 flutter 和 vscode 我也使用了 android SDk 命令行工具和 ZD52387880E1EA22817A72Ddk875Z JD52387880E1EA22817A72Ddk877.2 I was trying to run my first flutter app which comes by default in flutter on my Moto G 5 Plus real android device, but this error occurred.我试图在我的 Moto G 5 Plus 真正的 android 设备上运行我的第一个 flutter 应用程序,该应用程序默认出现在 flutter 中,但是发生了这个错误。

'''Launching lib\main.dart on Moto G 5 Plus in debug mode... '''在调试模式下在 Moto G 5 Plus 上启动 lib\main.dart...

FAILURE: Build failed with an exception. FAILURE:构建失败并出现异常。

  • What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.出了什么问题:无法确定任务':app:compileDebugJavaWithJavac'的依赖关系。

Failed to find Build Tools revision 29.0.2找不到构建工具修订版 29.0.2

  • Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.使用 --info 或 --debug 选项运行以获得更多日志 output。 Run with --scan to get full insights.运行 --scan 以获得完整的见解。

  • Get more help at https://help.gradle.orghttps://help.gradle.org获得更多帮助

BUILD FAILED in 3m 21s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)'''在 3m 21s 内构建失败异常:Gradle 任务 assembleDebug 失败,退出代码为 1 退出(sigterm)'''

Please help me to solve this problem请帮我解决这个问题

Solution解决方案

  1. flutter clean flutter 清洁
  2. delete android/.gradle and run删除 android/.gradle 并运行
  3. revert pubspec.lock and flutter pub get flutter run恢复 pubspec.lock 和 flutter pub 让 flutter 运行

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter 连接:compileDebugJavaWithJavac 错误 - Flutter connectivity:compileDebugJavaWithJavac error Flutter 构建错误:无法确定任务':app:compileDebugJavaWithJavac的依赖关系 - Flutter Build Error:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac flutter 错误无法确定任务':app:compileDebugJavaWithJavac'的依赖关系 - flutter error Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' 出现错误:android studio 不支持 compileDebugJavaWithJavac' has completed,如何解决? - getting error: compileDebugJavaWithJavac' has completed is not supported in android studio, how to fix it? 如何修复 flutter 中的“:app:checkDebugDuplicateClasses”错误 - How to fix ':app:checkDebugDuplicateClasses' error in flutter gradle 任务 ':app:compileDebugJavaWithJavac' 出错 - Error on gradle task ':app:compileDebugJavaWithJavac' 如何解决“任务执行失败:app:compileDebugJavaWithJavac”这个错误? - How to solve 'Execution failed for task ':app:compileDebugJavaWithJavac'' this error? flutter 错误无法确定任务':app:compileDebugJavaWithJavac'和配置':app:debugCompileClasspath'的依赖关系 - flutter error Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' and config ':app:debugCompileClasspath' 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。[Flutter] - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.[Flutter] 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系 - Flutter - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' - Flutter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM