主要解决okhttp 版本问题。
1、去maven 仓库查看minio 适合okhttp 版,引入后刷新。
2、如果还出现okhttp 失败问题,首先看是否是最新的,idea 打包会打成旧的,解决方式可以查看 iml 文件,搜索okhttp ,可以看出版本与自己引入不符合,使用mvn idea:idea 刷新iml 文件即可
An attempt was made to call a method that does not exist. The attempt was made from the following location:
io.minio.S3Base.<clinit>(S3Base.java:105)
The following method did not exist:
okhttp3.RequestBody.create([BLokhttp3/MediaType;)Lokhttp3/RequestBody;
The method's class, okhttp3.RequestBody, is available from the following locations:
jar:file:/D:/repository/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9.jar!/okhttp3/RequestBody.class
The class hierarchy was loaded from the following locations:
okhttp3.RequestBody: file:/D:/repository/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of okhttp3.RequestBody
版权声明:本文为weixin_43369815原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。