Android Development?

polaris · · 465 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I am brand new to golang. I am enjoying everything I have learned about it so far. However I cant seem to find a clear answer on whether this is a legitimate way to design Android Apps or if I should stick to Java for this. I see alot of posts about how it&#39;s coming, but a lot of them are from like 2 years ago. Anyone here use golang specifically for Android development? </p> <p>Thanks and sorry for stupid question</p> <hr/>**评论:**<br/><br/>gen2brain: <pre><p>There is a <a href="https://github.com/golang/go/wiki/Mobile" rel="nofollow">https://github.com/golang/go/wiki/Mobile</a> . I used it in few apps but only as bindings, not as full native app, so UI is in Java but all network calls are in Go. gomobile can help you create shared library and Java bindings. You can also create web UI frontend in something like materialize-css and similar, but I prefer to have native UI. </p> <p>For native apps there is also <a href="https://github.com/xlab/android-go" rel="nofollow">https://github.com/xlab/android-go</a> , generated Android bindings from SDK, there are examples how you can use it.</p> <p>For simpler 2d games you can use <a href="https://github.com/gen2brain/raylib-go" rel="nofollow">https://github.com/gen2brain/raylib-go</a> , without any Java code. I am making one with raylib at my spare time.</p> <p>Native Android UI with only Go and without Java is not possible.</p></pre>jeffrallen: <pre><p>It is not a stupid question, especially since the existing answers to it are out of date. One year ago I mixed Go and Java by having them talk via protobufs between them. It was yucky.</p> <p>I am also interested in knowing the current answer to this today.</p> <p>-jeff</p></pre>hajimehoshi: <pre><p>We have released an Android/iOS game (<a href="http://blockbros.net/tsugunai/" rel="nofollow">http://blockbros.net/tsugunai/</a>), whose engine part is written in Go (Ebiten <a href="https://github.com/hajimehoshi/ebiten" rel="nofollow">https://github.com/hajimehoshi/ebiten</a>). The UI part uses ReactNative not in Go.</p></pre>loganjspears: <pre><p>Stick to Java unless you already have an existing library in Go and you really really don&#39;t want to translate it to Java. Definitely don&#39;t build the entire APK with it. Its experimental at this point and if you get stuck your out of luck. I have used it and its very frustrating. </p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

465 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传