<p>I am building a shared library to use in my iOS and Android app and it crashes in my x86 simulator (Genymotion). I have read these 2 closed issues <a href="https://github.com/golang/go/issues/10743" rel="nofollow">https://github.com/golang/go/issues/10743</a> and <a href="https://github.com/golang/go/issues/9327" rel="nofollow">https://github.com/golang/go/issues/9327</a> and it looks like this was addressed in 1.6 but I have updated my tool chain, re-ran gomobile init and rebuilt my .aar file and it still crashes at runtime. Is there something I am missing?</p>
<hr/>**评论:**<br/><br/>ar1819: <pre><p>Without any kind of logs or error it's really difficult to say. Can you provide more information? </p>
<p>I used gomobile for x86 android - tho not that much. It worked for me without issues.</p></pre>caseynashvegas: <pre><p>for me the error is detailed here: <a href="http://pastebin.com/uPuCpg40" rel="nofollow">http://pastebin.com/uPuCpg40</a> it seems like the JNI file is only being created for ARM not for x86. What commands do you run when you do your gomobile bind?</p></pre>condanky: <pre><p>i didnt realize this was out for 1.6 yet! what is the command to build to x86. Is it any different than just setting the target to android?</p></pre>caseynashvegas: <pre><p>I'm trying to figure that out myself :) </p></pre>dasacc22: <pre><p>how are you building the app? With the gradle plugin? Manually calling gobind with a particular set of flags?</p></pre>caseynashvegas: <pre><p>I'm not using the gradle plugin, just doing gomobile bind with no flags.</p></pre>caseynashvegas: <pre><p>I'm now up and running. Here is what the fix was: Delete your the go mobile src/package and binary from your $GOPATH (the bin, pkg, and src folder artifacts). Then reinstall gomobile and it works fine. My tool chain just wasn't set up correctly after all.</p></pre>condanky: <pre><p>did you need a different target command other than -target android to build for x86?</p></pre>caseynashvegas: <pre><p>No.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传