簡體   English   中英

LibGDX游戲在android上關閉,沒有錯誤

[英]LibGDX game close on android without error

在桌面上一切正常,但是當我嘗試在android上運行它時。 它只顯示黑屏幾秒鍾,然后關閉。 這是一個logcat:

11-21 17:41:12.647 12085-12085/? D/dalvikvm: Zygote::ForkAndSpecialize : 0
11-21 17:41:12.648 12085-12085/? D/dalvikvm: zygote get new systemTid : 12085
11-21 17:41:12.649 12085-12085/? D/dalvikvm: Late-enabling CheckJNI
11-21 17:41:12.651 12085-12091/? D/dalvikvm: Elevating priority from 0 to -8
11-21 17:41:12.651 12085-12085/? D/jdwp: prepping for JDWP over ADB
11-21 17:41:12.652 12085-12085/? D/jdwp: ADB transport startup
11-21 17:41:12.652 12085-12092/? D/jdwp: JDWP: thread running
11-21 17:41:12.652 12085-12092/? D/jdwp: acceptConnection
11-21 17:41:12.652 12085-12092/? D/jdwp: trying to receive file descriptor from ADB
11-21 17:41:12.653 12085-12085/? D/dalvikvm: zygote get thread init done
11-21 17:41:12.661 12085-12092/? D/jdwp: received file descriptor 34 from ADB
11-21 17:41:12.664 12085-12092/? D/jdwp: processIncoming
11-21 17:41:12.665 12085-12092/? D/jdwp: processIncoming
11-21 17:41:12.665 12085-12092/? D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x13, id=0x4000009C, flags=0x0, dataLen=0x8
11-21 17:41:12.759 12085-12092/? D/jdwp: processIncoming
11-21 17:41:12.759 12085-12092/? D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x17, id=0x4000009D, flags=0x0, dataLen=0xC
11-21 17:41:12.761 12085-12092/? D/jdwp: processIncoming
11-21 17:41:12.761 12085-12092/? D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x13, id=0x4000009E, flags=0x0, dataLen=0x8
11-21 17:41:12.762 12085-12092/? D/jdwp: processIncoming
11-21 17:41:12.762 12085-12092/? D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x13, id=0x4000009F, flags=0x0, dataLen=0x8
11-21 17:41:12.762 12085-12092/? D/jdwp: processIncoming
11-21 17:41:12.762 12085-12092/? D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A0, flags=0x0, dataLen=0x9
11-21 17:41:12.770 12085-12085/? D/jdwp: sendBufferedRequest : len=0x3D
11-21 17:41:12.876 12085-12085/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x3F
11-21 17:41:12.886 12085-12085/com.kzoper.civgame W/asset: AssetManager-->addDefaultAssets CIP path not exsit!
11-21 17:41:12.886 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:12.886 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A1, flags=0x0, dataLen=0x9
11-21 17:41:12.889 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:12.889 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A2, flags=0x0, dataLen=0x9
11-21 17:41:12.889 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:12.890 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A3, flags=0x0, dataLen=0x9
11-21 17:41:12.951 12085-12085/com.kzoper.civgame D/dalvikvm: Trying to load lib /data/app-lib/com.kzoper.civgame-1/libgdx.so 0x418f8fd0
11-21 17:41:12.952 12085-12085/com.kzoper.civgame D/dalvikvm: Added shared lib /data/app-lib/com.kzoper.civgame-1/libgdx.so 0x418f8fd0
11-21 17:41:12.953 12085-12085/com.kzoper.civgame D/dalvikvm: No JNI_OnLoad found in /data/app-lib/com.kzoper.civgame-1/libgdx.so 0x418f8fd0, skipping init
11-21 17:41:12.965 12085-12085/com.kzoper.civgame I/GL2: all initialized 2
11-21 17:41:12.971 12085-12085/com.kzoper.civgame D/libEGL: loaded /system/lib/egl/libEGL_mali.so
11-21 17:41:12.976 12085-12085/com.kzoper.civgame D/libEGL: loaded /system/lib/egl/libGLESv1_CM_mali.so
11-21 17:41:12.979 12085-12085/com.kzoper.civgame D/libEGL: loaded /system/lib/egl/libGLESv2_mali.so
11-21 17:41:13.340 12085-12085/com.kzoper.civgame I/AndroidInput: sensor listener setup
11-21 17:41:13.342 12085-12085/com.kzoper.civgame V/PhoneWindow: DecorView setVisiblity: visibility = 4
11-21 17:41:13.350 12085-12085/com.kzoper.civgame V/PhoneWindow: DecorView setVisiblity: visibility = 0
11-21 17:41:13.362 12085-12085/com.kzoper.civgame V/InputMethodManager: Not IME target window, ignoring
11-21 17:41:13.388 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:13.388 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A4, flags=0x0, dataLen=0x9
11-21 17:41:13.388 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:13.391 12085-12085/com.kzoper.civgame D/OpenGLRenderer: Enabling debug mode 0
11-21 17:41:13.396 12085-12085/com.kzoper.civgame I/SurfaceView: Changes: creating=true format=true size=true visible=true left=true top=true mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=true mVisible=false mRequestedVisible=true
11-21 17:41:13.399 12085-12085/com.kzoper.civgame I/SurfaceView: Cur surface: Surface(name=null, identity=-1)
11-21 17:41:13.410 12085-12098/com.kzoper.civgame V/SurfaceView: com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20{41904028 VFE..... .F....ID 0,0-800,480} got resized: w=800 h=480, cur w=-1 h=-1
11-21 17:41:13.412 12085-12085/com.kzoper.civgame I/SurfaceView: New surface: Surface(name=null, identity=737), vis=true, frame=Rect(0, 0 - 800, 480)
11-21 17:41:13.412 12085-12085/com.kzoper.civgame I/SurfaceView: visibleChanged -- surfaceCreated
11-21 17:41:13.412 12085-12085/com.kzoper.civgame I/SurfaceView: surfaceChanged -- format=4 w=800 h=480
11-21 17:41:13.412 12085-12085/com.kzoper.civgame I/SurfaceView: surfaceRedrawNeeded
11-21 17:41:13.412 12085-12085/com.kzoper.civgame I/SurfaceView: finishedDrawing
11-21 17:41:13.416 12085-12113/com.kzoper.civgame W/GL2JNIView: creating OpenGL ES 2.0 context
11-21 17:41:13.417 12085-12113/com.kzoper.civgame W/GL2JNIView: Returning a GLES 2 context
11-21 17:41:13.418 12085-12085/com.kzoper.civgame V/SurfaceView: Layout: x=0 y=0 w=800 h=480, frame=Rect(0, 0 - 800, 480)
11-21 17:41:13.422 12085-12085/com.kzoper.civgame I/SurfaceView: Changes: creating=false format=false size=false visible=false left=false top=false mUpdateWindowNeeded=true mReportDrawNeeded=true redrawNeeded=false forceSizeChanged=false mVisible=true mRequestedVisible=true
11-21 17:41:13.422 12085-12085/com.kzoper.civgame I/SurfaceView: Cur surface: Surface(name=null, identity=737)
11-21 17:41:13.429 12085-12113/com.kzoper.civgame I/AndroidGraphics: OGL renderer: Mali-400 MP
11-21 17:41:13.429 12085-12113/com.kzoper.civgame I/AndroidGraphics: OGL vendor: ARM
11-21 17:41:13.429 12085-12113/com.kzoper.civgame I/AndroidGraphics: OGL version: OpenGL ES 2.0
11-21 17:41:13.429 12085-12113/com.kzoper.civgame I/AndroidGraphics: OGL extensions: GL_EXT_debug_marker GL_OES_texture_npot GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness 
11-21 17:41:13.429 12085-12113/com.kzoper.civgame I/AndroidGraphics: framebuffer: (5, 6, 5, 0)
11-21 17:41:13.429 12085-12113/com.kzoper.civgame I/AndroidGraphics: depthbuffer: (24)
11-21 17:41:13.429 12085-12113/com.kzoper.civgame I/AndroidGraphics: stencilbuffer: (8)
11-21 17:41:13.430 12085-12113/com.kzoper.civgame I/AndroidGraphics: samples: (0)
11-21 17:41:13.430 12085-12113/com.kzoper.civgame I/AndroidGraphics: coverage sampling: (false)
11-21 17:41:13.430 12085-12085/com.kzoper.civgame I/SurfaceView: New surface: Surface(name=null, identity=737), vis=true, frame=Rect(0, 0 - 800, 480)
11-21 17:41:13.430 12085-12085/com.kzoper.civgame I/SurfaceView: surfaceRedrawNeeded
11-21 17:41:13.430 12085-12085/com.kzoper.civgame I/SurfaceView: finishedDrawing
11-21 17:41:13.439 12085-12113/com.kzoper.civgame I/AndroidGraphics: Managed meshes/app: { }
11-21 17:41:13.439 12085-12085/com.kzoper.civgame V/SurfaceView: Layout: x=0 y=0 w=800 h=480, frame=Rect(0, 0 - 800, 480)
11-21 17:41:13.439 12085-12113/com.kzoper.civgame I/AndroidGraphics: Managed textures/app: { }
11-21 17:41:13.439 12085-12113/com.kzoper.civgame I/AndroidGraphics: Managed cubemap/app: { }
11-21 17:41:13.440 12085-12113/com.kzoper.civgame I/AndroidGraphics: Managed shaders/app: { }
11-21 17:41:13.440 12085-12113/com.kzoper.civgame I/AndroidGraphics: Managed buffers/app: { }
11-21 17:41:13.464 12085-12085/com.kzoper.civgame V/InputMethodManager: onWindowFocus: com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20{41904028 VFE..... .F....I. 0,0-800,480} softInputMode=32 first=true flags=#1810500
11-21 17:41:13.465 12085-12085/com.kzoper.civgame V/InputMethodManager: START INPUT: com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20{41904028 VFE..... .F....I. 0,0-800,480} ic=com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20$1@41945728 tba=android.view.inputmethod.EditorInfo@41945370 controlFlags=#105
11-21 17:41:13.472 12085-12113/com.kzoper.civgame D/dalvikvm: Note: class Lcom/badlogic/gdx/graphics/profiling/GLInterceptor; has 162 unimplemented (abstract) methods
11-21 17:41:13.476 12085-12085/com.kzoper.civgame V/InputMethodManager: Starting input: Bind result=InputBindResult{null com.android.inputmethod.latin/.LatinIME #530}
11-21 17:41:13.511 12085-12085/com.kzoper.civgame I/InputMethodManager: handleMessage: MSG_SET_ACTIVE true, was false
11-21 17:41:13.888 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:13.888 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A5, flags=0x0, dataLen=0x9
11-21 17:41:13.888 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:14.387 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:14.387 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A6, flags=0x0, dataLen=0x9
11-21 17:41:14.388 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:14.455 12085-12113/com.kzoper.civgame D/dalvikvm: GC_FOR_ALLOC freed 1265K, 18% free 6280K/7580K, paused 10ms, total 11ms
11-21 17:41:14.455 12085-12113/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:14.888 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:14.888 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A7, flags=0x0, dataLen=0x9
11-21 17:41:14.888 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:15.388 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:15.388 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A8, flags=0x0, dataLen=0x9
11-21 17:41:15.388 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:15.633 12085-12113/com.kzoper.civgame D/dalvikvm: GC_FOR_ALLOC freed 1403K, 20% free 6305K/7848K, paused 11ms, total 11ms
11-21 17:41:15.633 12085-12113/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:15.887 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:15.887 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000A9, flags=0x0, dataLen=0x9
11-21 17:41:15.887 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:16.388 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:16.388 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000AA, flags=0x0, dataLen=0x9
11-21 17:41:16.388 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:16.887 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:16.888 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000AB, flags=0x0, dataLen=0x9
11-21 17:41:16.898 12085-12113/com.kzoper.civgame D/dalvikvm: GC_FOR_ALLOC freed 1404K, 20% free 6328K/7848K, paused 30ms, total 31ms
11-21 17:41:16.898 12085-12113/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:16.899 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:17.388 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:17.388 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000AC, flags=0x0, dataLen=0x9
11-21 17:41:17.388 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:17.887 12085-12085/com.kzoper.civgame I/InputMethodManager: handleMessage: MSG_UNBIND 530
11-21 17:41:17.888 12085-12092/com.kzoper.civgame D/jdwp: processIncoming
11-21 17:41:17.888 12085-12092/com.kzoper.civgame D/jdwp: handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x400000AD, flags=0x0, dataLen=0x9
11-21 17:41:17.888 12085-12092/com.kzoper.civgame D/jdwp: sendBufferedRequest : len=0x34
11-21 17:41:17.888 12085-12085/com.kzoper.civgame D/InputMethodManager: deactivate the inputconnection in ControlledInputConnectionWrapper.
11-21 17:41:17.889 12085-12085/com.kzoper.civgame V/InputMethodManager: START INPUT: com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20{41904028 VFE..... .F...... 0,0-800,480} ic=com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20$1@418ffcd8 tba=android.view.inputmethod.EditorInfo@418fc668 controlFlags=#100
11-21 17:41:17.891 12085-12085/com.kzoper.civgame V/InputMethodManager: Starting input: Bind result=InputBindResult{null com.android.inputmethod.latin/.LatinIME #531}

無法想象有什么錯誤。 也許你可以告訴我。

它崩潰是因為使用了許多精靈。 更改:Sprite sprite = new Sprite(new Texture(“ ../ aa.png”)); 使用TextureAtlas幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM