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
Closed

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

hmgle opened this issue Sep 11, 2015 · 3 comments

Comments

@hmgle
Copy link

hmgle 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
Copy link
Contributor

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
Copy link
Author

hmgle 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
Copy link
Contributor

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.

@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.
Projects
None yet
Development

No branches or pull requests

3 participants