我正在为该应用程序开发一个应用程序(https://github.com/stirante/RuneChanger)和一个库(https://github.com/stirante/lol-client-java-api)。在库中,我使用 Java-WebSocket,它最近添加了 SLF4J API。在应用程序中,我有 logback 作为依赖项,它也有 SLF4J 作为依赖项。
在编译应用程序时,我有这样的错误:
[ERROR] the unnamed module reads package org.slf4j.spi from both slf4j.api and lol.client.java.api
[ERROR] the unnamed module reads package org.slf4j from both slf4j.api and lol.client.java.api
[ERROR] the unnamed module reads package org.slf4j.helpers from both slf4j.api and lol.client.java.api
[ERROR] the unnamed module reads package org.slf4j.event from both slf4j.api and lol.client.java.api
Run Code Online (Sandbox Code Playgroud)
完整日志在这里:https : //travis-ci.org/github/stirante/RuneChanger/builds/693607053
我尝试移动库中的依赖项(https://github.com/stirante/lol-client-java-api/commit/f62c31f02ace86d50546af113a94fa37f814fb98),但没有运气。
我该如何处理这种情况?
编辑:暂时我转移org.slf4j到另一个包并且它可以工作,但它看起来像一个丑陋的解决方案,因为日志记录可能无法从这个库中工作。