Cannot bulid shadowsocks-android On Ubuntu OS


#1

Git clone the code for the latest version to Ubuntu, and then build apk files with android studio. I got some errors after around 10 mins.
Here is the error info:

Task :core:goBuild FAILED
Build liboverture.so armeabi-v7a
main.go:12:2: cannot find package “github.com/shadowsocks/overture/core” in any of:
/usr/lib/go-1.10/src/github.com/shadowsocks/overture/core (from $GOROOT)
/home/yanggis/go/src/github.com/shadowsocks/overture/core (from $GOPATH)
log_android.go:31:2: cannot find package “github.com/sirupsen/logrus” in any of:
/usr/lib/go-1.10/src/github.com/sirupsen/logrus (from $GOROOT)
/home/yanggis/go/src/github.com/sirupsen/logrus (from $GOPATH)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:core:goBuild’.

Process ‘command ‘/bin/bash’’ finished with non-zero exit value 255

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Any suggestions to fix them?
Thanks.


#2

After investigated the paths, now Android Studio can find all the paths now; but still ended with errors:

/home/xk/go/src/github.com/shadowsocks/overture/core/outbound/client.go:89:26: unknown field ‘Control’ in struct literal of type net.Dialer
/home/xk/go/src/github.com/shadowsocks/overture/core/outbound/client.go:96:26: unknown field ‘Control’ in struct literal of type net.Dialer

Anybody know how to fix them?


#3

go 1.11 is required.