【问题标题】:Android Studio: Execution failed for task ':buildSrc:compileGroovy'Android Studio:任务“:buildSrc:compileGroovy”执行失败
【发布时间】:2020-03-24 07:27:54
【问题描述】:

当我尝试将项目推送到 git 时出现错误。

Execution failed for task ':buildSrc:compileGroovy'.

> BUG! exception in phase 'semantic analysis' in source unit  Unsupported class file major version 57

有人知道怎么解决吗?

【问题讨论】:

    标签: android-studio gradle groovy


    【解决方案1】:

    找到了解决办法。需要在 gradle.properties 文件中添加以下行

    org.gradle.java.home = / Library / Java / JavaVirtualMachines / jdk1.8.0_241.jdk / Contents / Home

    只有jdk的路径需要专门看你的机器

    【讨论】:

      猜你喜欢
      • 2015-05-23
      • 2016-12-18
      • 1970-01-01
      • 1970-01-01
      • 2022-11-18
      • 2015-02-09
      • 2015-08-11
      • 2016-08-27
      • 1970-01-01
      相关资源
      最近更新 更多