我正在制作一个项目,当我运行它时它会起作用,但在我尝试将手机插入计算机并运行它之后(我甚至尝试使用模拟器)它会立即说它停止了。关于桌面版,同样,它在我运行它时有效,但在我将它变为JAR文件后,它会立即崩溃。
为什么它通过intellij工作,而不是通过真实文件?无论如何,这里是logcat:
08-10 22:37:57.639 21323-21323/com.ak01.flappysquid.android I/art﹕ Late-enabling -Xcheck:jni
08-10 22:37:57.710 21323-21323/com.ak01.flappysquid.android I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.1_RB1.05.00.02.042.016_msm8226_LA.BF.1.1.1_RB1__release_AU ()
OpenGL ES Shader Compiler Version: E031.25.03.00
Build Date: 02/11/15 Wed
Local Branch:
Remote Branch: quic/LA.BF.1.1.1_rb1.10
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LA.BF.1.1.1_RB1.05.00.02.042.016 + 62ca4eb + acd831d + 9f8b442 + e027a02 + cba30ba + 53c303a + a649d79 + 23e16f8 + 5e97da7 + cbd2a44 + 33d072a + 7aacf06 + 72b33e7 + 28f6f60 + b4c13d8 + NOTHING
08-10 22:37:57.739 21323-21323/com.ak01.flappysquid.android I/AndroidInput﹕ sensor listener setup
08-10 22:37:57.746 21323-21345/com.ak01.flappysquid.android D/OpenGLRenderer﹕ Use EGL_SWAP_BEHAVIOR_PRESERVED: true
08-10 22:37:57.756 21323-21323/com.ak01.flappysquid.android D/Atlas﹕ Validating map...
08-10 22:37:57.771 21323-21323/com.ak01.flappysquid.android I/AndroidInput﹕ sensor listener tear down
08-10 22:37:57.796 21323-21345/com.ak01.flappysquid.android I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.1_RB1.05.00.02.042.016_msm8226_LA.BF.1.1.1_RB1__release_AU ()
OpenGL ES Shader Compiler Version: E031.25.03.00
Build Date: 02/11/15 Wed
Local Branch:
Remote Branch: quic/LA.BF.1.1.1_rb1.10
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LA.BF.1.1.1_RB1.05.00.02.042.016 + 62ca4eb + acd831d + 9f8b442 + e027a02 + cba30ba + 53c303a + a649d79 + 23e16f8 + 5e97da7 + cbd2a44 + 33d072a + 7aacf06 + 72b33e7 + 28f6f60 + b4c13d8 + NOTHING
08-10 22:37:57.796 21323-21345/com.ak01.flappysquid.android I/OpenGLRenderer﹕ Initialized EGL, version 1.4
08-10 22:37:57.812 21323-21345/com.ak01.flappysquid.android D/OpenGLRenderer﹕ Enabling debug mode 0
08-10 22:38:06.131 21323-21323/com.ak01.flappysquid.android I/AndroidInput﹕ sensor listener setup
08-10 22:38:06.141 21323-21341/com.ak01.flappysquid.android W/GL2JNIView﹕ creating OpenGL ES 2.0 context
08-10 22:38:06.175 21323-21341/com.ak01.flappysquid.android I/GL2﹕ all initialized 2
08-10 22:38:06.175 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ OGL renderer: Adreno (TM) 305
08-10 22:38:06.175 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ OGL vendor: Qualcomm
08-10 22:38:06.175 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ OGL version: OpenGL ES 3.0 V@84.0 AU@05.00.02.042.016 (CL@)
08-10 22:38:06.175 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ OGL extensions: GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_robustness GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_sync GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_depth_texture_cube_map GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_array_object GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_filter_anisotropic GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_disjoint_timer_query
08-10 22:38:06.176 21323-21341/com.ak01.flappysquid.android W/Adreno-EGL﹕ <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
08-10 22:38:06.179 21323-21341/com.ak01.flappysquid.android W/Adreno-EGL﹕ <qeglDrvAPI_eglGetConfigAttrib:632>: EGL_BAD_ATTRIBUTE
08-10 22:38:06.179 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ framebuffer: (5, 6, 5, 0)
08-10 22:38:06.179 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ depthbuffer: (16)
08-10 22:38:06.179 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ stencilbuffer: (0)
08-10 22:38:06.179 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ samples: (0)
08-10 22:38:06.179 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ coverage sampling: (false)
08-10 22:38:06.243 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ Managed meshes/app: { }
08-10 22:38:06.243 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ Managed textures/app: { }
08-10 22:38:06.243 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ Managed cubemap/app: { }
08-10 22:38:06.249 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ Managed shaders/app: { }
08-10 22:38:06.252 21323-21341/com.ak01.flappysquid.android I/AndroidGraphics﹕ Managed buffers/app: { }
08-10 22:38:06.367 21323-21341/com.ak01.flappysquid.android E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 56397
Process: com.ak01.flappysquid.android, PID: 21323
com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: squiddy.png
at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:140)
at com.badlogic.gdx.graphics.TextureData$Factory.loadFromFile(TextureData.java:98)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:100)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:92)
at com.ak01.flappysquid.Assets.load(Assets.java:53)
at com.ak01.flappysquid.FlappySquid.create(FlappySquid.java:12)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:241)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1511)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: squiddy.png (Internal)
at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:77)
at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:222)
at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:137)
at com.badlogic.gdx.graphics.TextureData$Factory.loadFromFile(TextureData.java:98)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:100)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:92)
at com.ak01.flappysquid.Assets.load(Assets.java:53)
at com.ak01.flappysquid.FlappySquid.create(FlappySquid.java:12)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:241)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1511)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
Caused by: java.io.FileNotFoundException: squiddy.png
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:313)
at android.content.res.AssetManager.open(AssetManager.java:287)
at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:75)
at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:222)
at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:137)
at com.badlogic.gdx.graphics.TextureData$Factory.loadFromFile(TextureData.java:98)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:100)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:92)
at com.ak01.flappysquid.Assets.load(Assets.java:53)
at com.ak01.flappysquid.FlappySquid.create(FlappySquid.java:12)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:241)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1511)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
08-10 22:38:09.465 21323-21341/com.ak01.flappysquid.android I/Process﹕ Sending signal. PID: 21323 SIG: 9
另外,有没有办法保存JAR文件的日志?
编辑:如果您需要更多(或更少)信息,请告诉我。
编辑:用android解决它(它现在在我的手机上运行)但它仍然不能作为JAR文件工作。有没有办法为它保存日志?