Android Studio Ladybug:您的构建当前配置为使用不兼容的 Java 21.0.3 和 Gradle 8.0。无法同步项目

问题描述 投票:0回答:1

升级到 Android Studio Ladybug 后,我收到以下错误消息:

Your build is currently configured to use incompatible Java 21.0.3 and Gradle 8.0. Cannot sync the project.

We recommend upgrading to Gradle version 8.9.

The minimum compatible Gradle version is 8.5.

The maximum compatible Gradle JVM version is 19.

Possible solutions:
 - Upgrade to Gradle 8.9 and re-sync
 - Upgrade to Gradle 8.5 and re-sync

我现在不想升级 Gradle。构建我的项目最简单的解决方案是什么?

java android android-studio gradle ladybug
1个回答
0
投票

最简单、最有效的解决方案是通过下载旧版本来降级 Java SDK。以下是具体操作方法:

  1. 下载 Java 17: enter image description here

  2. 对于“供应商”,选择 Jetbrains:

enter image description here

  1. 下载后,选择Java 17

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.