I'm trying to initialize web3j with following code:
Web3j web3 = Web3j.build(new HttpService()); // defaults to http://localhost:8545/
Web3ClientVersion web3ClientVersion = null;
try {
web3ClientVersion = web3.web3ClientVersion().sendAsync().get();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
String clientVersion = web3ClientVersion.getWeb3ClientVersion();
Also I've added as per manual dependency
compile ('org.web3j:core-android:2.2.1')
But android studio refuses to compile that.It says cannot resolve method