简体   繁体   English

java模块版本不匹配

[英]java modules version mismatch

I recently included some new jars in my project.我最近在我的项目中加入了一些新的 jars。 Proguard starting blowing up due to the module-info.class being a different version than the compiler version I use for my project, but the classes contained in the jar were the correct version.由于 module-info.class 与我用于项目的编译器版本不同,Proguard 开始崩溃,但 jar 中包含的类是正确的版本。

I'm using java 1.8 (major: 52).我正在使用 java 1.8(主要:52)。 The complaint was that the module-info.class was version 53.投诉是 module-info.class 是版本 53。

I ran into this with a number of jars.我遇到了一些 jars。 Is there a way around this with proguard? proguard有没有办法解决这个问题?

proguard] Reading library jar [/Users/dan.cosio/.m2/repository/org/codehaus/woodstox/stax2-api/4.2/stax2-api-4.2.jar]
 [proguard] Error: Can't read [/Users/dan.cosio/.m2/repository/org/codehaus/woodstox/stax2-api/4.2/stax2-api-4.2.jar] (Can't process class [module-info.class] (Unsupported class version number [53.0] (maximum 52.0, Java 1.8)))

I excluded the module-info.class from proguard so I can continue.我从 proguard 中排除了 module-info.class,所以我可以继续。 I added我添加了

<inLibFilter>!module-info.class</inLibFilter>

to my configuration.到我的配置。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM