Unsupported Java. Your build is currently configured to use Java 17.0.7 and Gradle 6.1.1.

一、报错信息

不支持的Java,你的构建当前配置使用的是Java17和Gradle6.1.1。因为Gradle6.1.1需要的是Java11,所以使用Android Studio默认的Java17肯定报错。

Unsupported Java. Your build is currently configured to use Java 17.0.7 and Gradle 6.1.1._第1张图片

以上是报错信息的截图,以下是报错信息的具体内容。

Unsupported Java. 
Your build is currently configured to use Java 17.0.7 and Gradle 6.1.1.

Possible solution:
 - Upgrade Gradle wrapper to 7.2 version and re-import the project

 

Could not open cp_init remapped class cache for dw5ezsq9vnujkjvxyvhfx35dd (C:\Users\����\.gradle\caches\6.1.1\scripts-remapped\ijmapper_6pumh5bsr2a60hlm62et368o\dw5ezsq9vnujkjvxyvhfx35dd\cp_init3607aee355f62839c5e6f549478ccc87).
> Could not open cp_init generic class cache for initialization script 'C:\Users\����\AppData\Local\Microsoft;\ijmapper.gradle' (C:\Users\����\.gradle\caches\6.1.1\scripts\dw5ezsq9vnujkjvxyvhfx35dd\cp_init\cp_init3607aee355f62839c5e6f549478ccc87).
   > Could not initialize class org.codehaus.groovy.classgen.Verifier

二、解决方法

1、下载和安装java11

你可能感兴趣的:(安卓gradle,java,开发语言)