java初学者,想试着开发插件玩一下,遇到了以下问题。
在build.gradle.kts中的dependencies加入了

implementation("org.apache.httpcomponents:httpclient:4.5.13")

能顺利通过编译,但是程序每次执行到HttpClients.createDefault()方法时,就会有该报错

java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.impl.client.CloseableHttpClient.execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/client/methods/CloseableHttpResponse;" the class loader (instance of net/mamoe/mirai/console/internal/plugin/JvmPluginClassLoaderN) of the current class, com/frankcwl/Majsoul, and the class loader (instance of net/mamoe/mirai/console/internal/plugin/DynLibClassLoader) for the method's defining class, org/apache/http/impl/client/CloseableHttpClient, have different Class objects for the type org/apache/http/client/methods/HttpUriRequest used in the signature

可能是因为引入的包和mirai依赖的冲突了,但是如果不在dependencies中添加的话,编译时就会报错Cannot resolve symbol 'HttpClients'
本人之前没有接触过gradle,请问该怎么修改