ipfs-shipyard / java-ipfs-http-client

A Java implementation of the HTTP IPFS API
MIT License
538 stars 243 forks source link

Couldn't connect to IPFS daemon #138

Closed redriel closed 4 years ago

redriel commented 5 years ago

Hi, I'm working on Android. I managed to instantiate an IPFS object like this:

Thread ipfsThread = new Thread(() -> {
       try{
    IPFS ipfs = new IPFS(new MultiAddress("/ip4/127.0.0.1/tcp/5001"));
    toastAsync("Connected to IPFS");
    } catch (Exception e ){
        e.printStackTrace();
    }
});
ipfsThread.start();

However, I get this error: error

I do indeed have a daemon running locally: daemon

Am I getting something wrong?

sontqq commented 4 years ago

Have you found a solution to this? I'm stucked at getting the same error.

redriel commented 4 years ago

Unfortunately no, I had to give up the project. IRC the author said Android was not supported so I think library cannot work on Android.

vsbogd commented 4 years ago

@redriel, I used this library on Android successfully. If you get this issue on Android emulator then you should try using 10.0.2.2 instead of 127.0.0.1 to connect to host device. See official documentation.

odisseus commented 4 years ago

Can this issue be closed?