Skip to content

all: add support for Android #8020

@gopherbot

Description

@gopherbot

by FelixAbleitner:

go version: go version go1.2.1 linux/amd64

1. compile a Go program with GOARCH=arm, GOOS=linux and GOARM=7 that uses
"net.ResolveUDPAddr("udp", someServer)"
2. put it onto an Android device and execute it using shell (only works in internal
memory afaik)

What happened?
err is set to "error reading DNS config: open /etc/resolv.conf: no such file or
directory"

What should have happened instead?
Go should resolve the address

Please provide any additional information below.
This is because /etc/resolv.conf does not exist on Android. Instead, the DNS can be
retrieved using the shell with command "getprop net.dns1".

I'm also open for any workarounds (that don't involve a complete alternative dns
implementation/library).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions