这是因为jdk版本太高了,可以调低版本

uniapp Android本地打包报 Your build is currently configured to use Java 17 and Gradle 6

可以尝试 JDK 1.8