所以我正在为我工作的Minecraft服务器编写一个插件,它将使用热门网站Challonge生成锦标赛。该网站创建括号,其中包含输入的参与者列表。我使用的是stefangeyer编写的Challonge Java API。但是,我收到了Gson和Retrofit的错误(两者都是依赖关系)。从我可以看到它可能是版本不匹配但我尝试了许多版本组合,我似乎无法让它工作。
错误:
Caused by: java.lang.IllegalAccessError: tried to access method com.google.gson.Gson.newJsonWriter(Ljava/io/Writer;)Lcom/google/gson/stream/JsonWriter; from class com.retrofit2.converter.gson.GsonRequestBodyConverter
at com.retrofit2.converter.gson.GsonRequestBodyConverter.convert(GsonRequestBodyConverter.java:46) ~[?:?]
at com.retrofit2.converter.gson.GsonRequestBodyConverter.convert(GsonRequestBodyConverter.java:31) ~[?:?]
at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:355) ~[?:?]
at retrofit2.ServiceMethod.toCall(ServiceMethod.java:115) ~[?:?]
at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:185) ~[?:?]
at retrofit2.OkHttpCall.execute(OkHttpCall.java:168) ~[?:?]
at com.exsoloscript.challonge.handler.call.RetrofitChallongeApiCall.sync(RetrofitChallongeApiCall.java:51) ~[?:?]
at com.nightshadepvp.tournament.command.run.TournamentCommand.onCommand(TournamentCommand.java:71) ~[?:?]
at com.nightshadepvp.tournament.Tournament.onCommand(Tournament.java:111) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
非常感谢所有帮助!
谢谢