Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.

Jetpack compose 项目创建预览报错提示:Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8._第1张图片
报错说明很明显提示Jdk需要11才支持 在gradle配置中进行修改就可以了
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8._第2张图片
勾选为Jdk 11 然后Apply ok 再次编译就可以了,如果没有11jdk那么选择embedded jdk也是可以的
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8._第3张图片

你可能感兴趣的:(Compose,android,java,gradle)