Golang application not running in android emulator.

xuanbao · · 884 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I start the android ARM emulator using emulator -avd Default</p> <p>It comes up well. </p> <p>Run : gomobile install golang.org/x/mobile/example/basic</p> <p>Application is installed on emulator. </p> <p>When I try to open the application in emulator it crashes. </p> <p>No errors are seen on the emulator terminal.</p> <p>The application works, if I copy the apk on my nexus device.</p> <p>Any ideas on how can I solve it? I am on a mac.</p> <p>architecture for my emulator is ARM </p> <hr/>**评论:**<br/><br/>pierrrre: <pre><p>What is the architecture of your emulator? arm? x86?</p></pre>sacnnd: <pre><p>its arm </p></pre>pierrrre: <pre><p>Can you run &#34;adb logcat&#34; and start your application?</p></pre>sacnnd: <pre><p>Here is what I get after I try to open the &#34;basic&#34; application</p> <blockquote> <p>adb logcat</p> </blockquote> <p>W/AudioTrack( 340): AUDIO_OUTPUT_FLAG_FAST denied by client</p> <p>I/ActivityManager( 340): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.golang.todo.basic/org.golang.app.GoNativeActivity (has extras)} from uid 10007 on display 0</p> <p>V/WindowManager( 340): addAppToken: AppWindowToken{b6e5224 token=Token{18691ab7 ActivityRecord{9b42db6 u0 org.golang.todo.basic/org.golang.app.GoNativeActivity t2}}} to stack=1 task=2 at 0</p> <p>I/Choreographer( 604): Skipped 133 frames! The application may be doing too much work on its main thread.</p> <p>V/WindowManager( 340): Adding window Window{9eaa9af u0 Starting org.golang.todo.basic} at 2 of 5 (after Window{b9e9873 u0 com.android.launcher/com.android.launcher2.Launcher})</p> <p>I/art ( 66): Background concurrent mark sweep GC freed 779(33KB) AllocSpace objects, 0(0B) LOS objects, 91% free, 93KB/1117KB, paused 1.154ms total 281.552ms</p> <p>I/art ( 1161): Not late-enabling -Xcheck:jni (already on)</p> <p>I/ActivityManager( 340): Start proc 1161:org.golang.todo.basic/u0a53 for activity org.golang.todo.basic/org.golang.app.GoNativeActivity</p> <p>V/PhoneStatusBar( 825): setLightsOn(true)</p> <p>I/ARMAssembler( 52): generated scanline__00000077:03515104_00009002_00000000 [127 ipp] (149 ins) at [0xb5707680:0xb57078d4] in 20000000 ns</p> <p>I/Choreographer( 340): Skipped 30 frames! The application may be doing too much work on its main thread.</p> <p>I/ARMAssembler( 52): generated scanline__00000077:03010104_00008002_00000000 [ 89 ipp] (110 ins) at [0xb57078e0:0xb5707a98] in 0 ns</p> <p>I/Choreographer( 340): Skipped 48 frames! The application may be doing too much work on its main thread.</p> <p>W/linker ( 1161): libbasic.so has text relocations. This is wasting memory and prevents security hardening. Please fix.</p> <p>E/Vold ( 51): Failed to find mounted volume for /storage/sdcard/Android/obb/org.golang.todo.basic/</p> <p>W/Vold ( 51): Returning OperationFailed - no handler for errno 0</p> <p>W/ContextImpl( 1161): Failed to ensure directory: /storage/sdcard/Android/obb/org.golang.todo.basic</p> <p>E/Vold ( 51): Failed to find mounted volume for /storage/sdcard/Android/data/org.golang.todo.basic/files/</p> <p>W/Vold ( 51): Returning OperationFailed - no handler for errno 0</p> <p>W/ContextImpl( 1161): Failed to ensure directory: /storage/sdcard/Android/data/org.golang.todo.basic/files</p> <p>V/WindowManager( 340): Adding window Window{65d3da8 u0 org.golang.todo.basic/org.golang.app.GoNativeActivity} at 2 of 6 (before Window{9eaa9af u0 Starting org.golang.todo.basic})</p> <p>I/GoLog ( 1161): app: EGL no config found (EGL_SUCCESS)</p> <p>I/WindowState( 340): WIN DEATH: Window{65d3da8 u0 org.golang.todo.basic/org.golang.app.GoNativeActivity}</p> <p>I/ActivityManager( 340): Process org.golang.todo.basic (pid 1161) has died</p> <p>I/Zygote ( 66): Process 1161 exited cleanly (1)</p> <p>W/ActivityManager( 340): Force removing ActivityRecord{9b42db6 u0 org.golang.todo.basic/org.golang.app.GoNativeActivity t2}: app died, no saved state</p> <p>W/InputMethodManagerService( 340): Got RemoteException sending setActive(false) notification to pid 1161 uid 10053</p></pre>pierrrre: <pre><p>Heyyy.... I don&#39;t know, sorry :(</p> <p>Does it work on a real device?</p></pre>sacnnd: <pre><p>yeah.. It does work on real device. :-)</p></pre>

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

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