calling go net.InterfaceAddrs() fails on Android SDK 30+

174 Views Asked by At

The issue 40569 makes Golang (mobile binding) incompatible with Android SDK 30+. Calling the stdlib function net.InterfaceAddrs() gives an error due to changes made in Android SDK 30.

Discussion suggests that it can be resolved by modifying go source. I followed the instructions as per this comment, and created the mobile binding using 'gomobile bind ...' ensuring that the modified go source build is used (present in GOPATH and GOROOT). But I'm still getting the same error (route ip+net: netlinkrib: permission denied) on Android SDK 33. Does 'gomobile bind' (gobind) use their own Go binary instead of our installation to create bindings ?

Does somebody have a better idea to resolve this ?

0

There are 0 best solutions below