TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Go and Android

82 pointsby stickhandleabout 11 years ago

9 comments

arayabout 11 years ago
Every six months or so another way to run go code on android devices is published. Sometimes it&#x27;s SDK wrappers, other times (like this) it&#x27;s native executables.<p>The author&#x27;s approach is interesting, but lacks MIPS support (though would extend successfully to x86 devices, as the author notes).<p>My almost equivalent attempt was to rebuild the Android NDK (native development kit) toolchain with --language=go added, and built all the GCC&#x2F;GNU toolchain support for it for <i>all</i> targets. (Granted the rebuild-the-toolchain solution can be a bit hairy if you&#x27;re not familiar with it.)
评论 #7496122 未加载
pjmlpabout 11 years ago
This is nothing more than a pure hack as it is not supported by Google and does not allow distribution via Play Store.<p>The ticket for Go support is open since 2012, so clearly there isn&#x27;t any interest from Android team to do so.<p><a href="https://code.google.com/p/android/issues/detail?id=39482" rel="nofollow">https:&#x2F;&#x2F;code.google.com&#x2F;p&#x2F;android&#x2F;issues&#x2F;detail?id=39482</a>
评论 #7495522 未加载
评论 #7495746 未加载
评论 #7495391 未加载
mikhailtabout 11 years ago
I&#x27;m not sure why Google hasn&#x27;t adopted Go as another supported language to develop on Android. It seems naturally and would expand the usage of the language.
评论 #7496203 未加载
评论 #7495117 未加载
评论 #7495156 未加载
评论 #7495123 未加载
评论 #7495113 未加载
DominikRabout 11 years ago
Using the NDK is already such a pain in the ass (we are using pjsip in some of our apps) that I couldn&#x27;t imagine why I would want to switch from C to Go, which isn&#x27;t even officially supported.<p>And you have to consider that soon everyone will switch to the Gradle build system, which adds amazing possibilities, but also adds a lot of complexity with build types and product flavors on top of the existing complexity with the NDK.
d0ugieabout 11 years ago
Hey Microsoft, if you want to blow my mind and have a good chuckle, implement Go into the Windows Phone NDK before Google does with Android&#x27;s.
评论 #7496209 未加载
habosaabout 11 years ago
This is awesome, one of those posts that reminds me why I read HN so much.<p>I&#x27;m an Android developer (they exist!) and I&#x27;ll definitely try this out in my next app, just for fun. Anyone have any ideas for something I could do with this that I can&#x27;t do, or do easily anyway, with a regular Java Android app?
dottrapabout 11 years ago
Is there a way to build your Go stuff as a real, embeddable library and then call into it from C (via the NDK)?<p>I think this would be a more natural way of doing it, and also be potentially more reusable on other platforms like iOS (which forbid launching processes).<p>I would be interested in writing a simple HTTP server for my app in Go, and be able to invoke it (start, stop, etc) through a simple C-API. Then I could write the rest of the GUI in the native platform language (Java for Android, Objective-C for iOS).
评论 #7495516 未加载
kashifabout 11 years ago
Dart is what is coming to Android with ART eventually - not Go.
评论 #7495369 未加载
评论 #7495297 未加载
higherpurposeabout 11 years ago
Would be nice if they started adding support for Go in Android 5.0, which won&#x27;t be out until the end of the year at the very least.