构建Android gradle项目时出现问题:Task:buildSrc:compileGroovy常见问题

x759pob2  于 4个月前  发布在  Android
关注(0)|答案(1)|浏览(76)

我试图在我的Windows机器上构建一个Android SDK。我将Java升级到最新的64位JDK(21),当运行.\gradlew.bat core:assembleCoreDebug时,我得到这些错误。
如何解决?

Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :buildSrc:compileGroovy FAILED
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSrc:compileGroovy'.
> BUG! exception in phase 'semantic analysis' in source unit 'C:\Users\user\Downloads\mobile\android\buildSrc\src\main\groovy\Javadoc.groovy' Unsupported class file major version 65

* 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 5s
1 actionable task: 1 executed

字符串

xxe27gdn

xxe27gdn1#

我所做的是删除以下文件夹:
1.第一个月

  1. .idea
  2. build
    然后同步和构建。

相关问题