简体   繁体   English

不支持 class 文件主要版本 61 Cordova Mac

[英]Unsupported class file major version 61 Cordova Mac

So im on mac (Big sur), and i wish to build a Cordova app to android. I have java 17 installed, and gradle 7.1.1 .所以我在 mac(Big sur)上,我希望为 android 构建一个 Cordova 应用程序。我安装了java 17gradle 7.1.1

Im able to build the project on another windows computer just fine.我能够在另一台 windows 计算机上构建项目就好了。 (though i cannot rely on that for personal reasons) (尽管出于个人原因我不能依赖它)

But every time i try to build on mac, im confronted with following error:但是每次我尝试在 mac 上构建时,我都会遇到以下错误:

FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/me/app/cordovaProject/platforms/android/settings.gradle'

* What went wrong:
Could not compile settings file '/Users/me/app/cordovaProject/platforms/android/settings.gradle'.
> startup failed:
  General error during conversion: Unsupported class file major version 61

(There is more to the error but its long. Will provide if needed.) (错误更多,但它很长。如果需要会提供。)

Answered by @JustInCoding, the solution for me was to install JDK 16 , and then add org.gradle.java.home=your Jdk 16 path here in the gradle.properties file of my project. @JustInCoding 回答,我的解决方案是安装 JDK 16 ,然后添加org.gradle.java.home=your Jdk 16 path here in the gradle.properties file

Alternative solution that worked for me was to update gradle to 7.4.2.对我有用的替代解决方案是将 gradle 更新到 7.4.2。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TomEE 8 不支持的类文件主要版本 61 - Unsupported class file major version 61 with TomEE 8 不支持 class 文件主要版本 61 - Unsupported class file major version 61 不支持 gradle 的 bootJar 任务的类文件主版本 61 - Unsupported class file major version 61 for gradle's bootJar task dockerBuild 失败导致不受支持的 class 文件主要版本 61 错误 - dockerBuild fails resulting in an unsupported class file major version 61 error @SneakyThrows当使用lombok“@SneakyThrows”时,不支持class文件大版本61 - @SneakyThrowsWhen use lombok ”@SneakyThrows“,unsupported class file major version 61 IntelliJ gradle 项目错误“不支持的类文件主要版本 61” - IntelliJ gradle project error "Unsupported class file major version 61" Android Studio 错误“不支持 class 文件主要版本 61” - Android Studio Error "Unsupported class file major version 61" Maven Surefire 测试失败:不支持 class 文件主要版本 61 - Maven Surefire test failed: Unsupported class file major version 61 由于 Gradle/Java 版本错误而无法加载应用程序 - “不支持 class 文件主要版本 61” - Cant load app because of Gradle/Java version error - "Unsupported class file major version 61" 尝试在 Windows 中启动 Mule 4.4 时出现错误“Unsupported class file major version 61” - Getting error "Unsupported class file major version 61" trying to start Mule 4.4 in Windows
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM