Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile: can't create TCP server on Android #12584

Closed
hmgle opened this issue Sep 11, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@hmgle
Copy link

commented Sep 11, 2015

I try to port a TCP server to Android using gomobile. The apk always fails on:

l, e := net.Listen("tcp", "localhost:0")
@bradfitz

This comment has been minimized.

Copy link
Member

commented Sep 11, 2015

This isn't a great bug report. How does it fail? With what? Does it explode, or is e != nil? If e is not nil, what is e? If it explodes, how does it explode?

/cc @crawshaw

@hmgle

This comment has been minimized.

Copy link
Author

commented Sep 11, 2015

I am a beginner in Android, so I don't know how to output the err when runing this apk:

l, e := net.Listen("tcp", "localhost:0")
if e != nil {
    log.Fatal(e) // exit on this line, but I don't know how to show the err on Android
}

Can anyone tell me the correct way to debug it?

@bradfitz

This comment has been minimized.

Copy link
Member

commented Sep 11, 2015

Please ask questions on the golang-nuts mailing list. We only use the bug tracker for tracking bugs.

Your apk probably just doesn't have the right permissions listed in its manifest.

@bradfitz bradfitz closed this Sep 11, 2015

@golang golang locked and limited conversation to collaborators Sep 22, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.