Hello
When I run Web3j.build(HttpService("https://ropsten.infura.io/$id")).web3ClientVersion().send()
Therer is an error
java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
Inside HttpService and performIO I see
RequestBody.create(request, JSON_MEDIA_TYPE);
Is wrong
It should be
RequestBody.create(JSON_MEDIA_TYPE, request);

Kotlin 1.4.0
Quarkus 1.8.1.Final
Web3j 5.0.0
please use 4.6.3 which is the actual current latest lol - web3j 5.0.0 is on the way...
I encountered the same problem java.lang.NoSuchMethodError: okhttp3.RequestBody.create(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;;
when I use web3j-4.6.3 and run Web3ClientVersion clientVersion = web3.web3ClientVersion().send();
Is there any solution?
Still running into this issue, I am using Ganache. Will test with Geth when it's sync'd.
I encountered the same problem _java.lang.NoSuchMethodError: okhttp3.RequestBody.create(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;_;
when I use web3j-4.6.3 and runWeb3ClientVersion clientVersion = web3.web3ClientVersion().send();Is there any solution?
Did you manage to fix it?
Fixed: Manually adding the okhttp3 dependency will fix it!
Fixed: Manually adding the okhttp3 dependency will fix it!
thanks!
Most helpful comment
Fixed: Manually adding the okhttp3 dependency will fix it!