0

The code I added to my game to show a TextButton using libgdx causes it to crash. Anyone who can help me fix this will receive credit for the fix, this is an official game that will eventually be in the Google Play Store. I don't have the log for this since I'm using my phone to create, compile and test my code.

mainMenu.png playButtonPressed.png

playButtonsAtlas.atlas:

    playButtonPressed.png
    size: 240,202
    format: RGBA8888
    filter: Nearest,Nearest
    repeat: none
    playButton_up
      rotate: false
      xy: 0, 0
      size: 240, 101
      orig: 240, 101
      offset: 0, 0
      index: -1
    playButton_down
      rotate: false
      xy: 0, 102
      size: 240, 101
      orig: 240, 101
      offset: 0, 0
      index: -1

EarthCraft.java:

    package com.DodgeCoding.EarthCraft;

    import com.badlogic.gdx.*;
    import com.badlogic.gdx.graphics.*;
    import com.badlogic.gdx.graphics.g2d.*;
    import com.badlogic.gdx.scenes.scene2d.*;
    import com.badlogic.gdx.scenes.scene2d.ui.*;
    import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;
    import com.badlogic.gdx.scenes.scene2d.utils.*;

    public class EarthCraft implements ApplicationListener
    {
      Texture mainMenu;
      SpriteBatch batch;

      Stage stage;
      TextButton playButton;
      TextButtonStyle playButtonStyle;
      BitmapFont font;
      Skin skin;
      TextureAtlas playButtonAtlas;

      @Override
      public void create()
      {
        mainMenu = new Texture(Gdx.files.internal("main_menu.png"));
        batch = new SpriteBatch();

        stage = new Stage();
    Gdx.input.setInputProcessor(stage);
        font = new BitmapFont();
        skin = new Skin();
        playButtonAtlas = new TextureAtlas(Gdx.files.internal("playButtonsAtlas.atlas"));
        skin.addRegions(playButtonAtlas);
        playButtonStyle = new TextButtonStyle();
        playButtonStyle.font = font;
        playButtonStyle.up = skin.getDrawable("playButton_up");
        playButtonStyle.down = skin.getDrawable("playButton_down");
        playButton = new TextButton("PLAY", playButtonStyle);
        stage.addActor(playButton);
    }

    @Override
    public void render()
    {        
      Gdx.gl.glClearColor(1, 1, 1, 1);
      Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
      //super.render();
      /*
      super.render(); results in the render() method not being found
      */
      stage.draw(); //draws playButton

      batch.begin();
      batch.draw(mainMenu, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
      batch.end();
    }

    @Override
    public void dispose()
    {
    }

    @Override
    public void resize(int width, int height)
    {
    }

    @Override
    public void pause()
    {
    }

    @Override
    public void resume()
    {
    }
  }

Here is the log:

08-08 01:04:53.462 16945 16945 I   art    Late-enabling -Xcheck:jni
08-08 01:04:53.462 16945 16945 I   art    VMHOOK: rlim_cur : 0 pid:16945
08-08 01:04:53.472 16945 16945 W   HTCLOG    use specified tag [FDManager], func [0].
08-08 01:04:53.472 16945 16945 W   HTCLOG    mask=0x18
08-08 01:04:53.872 16945 16966 I   System    exec(logcat -v threadtime @ adrt.ADRTLogCatReader.run:42)
08-08 01:04:53.882 16945 16945 W   HTCLOG    use specified tag [libEGL], func [3].
08-08 01:04:53.882 16945 16945 W   HTCLOG    mask=0x18
08-08 01:04:53.882 16945 16945 I   Adreno-EGL    <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build:  ()
08-08 01:04:53.882 16945 16945 I   Adreno-EGL    OpenGL ES Shader Compiler Version: E031.25.03.04
08-08 01:04:53.882 16945 16945 I   Adreno-EGL    Build Date: 04/24/15 Fri
08-08 01:04:53.882 16945 16945 I   Adreno-EGL    Local Branch:
08-08 01:04:53.882 16945 16945 I   Adreno-EGL    Remote Branch:
08-08 01:04:53.882 16945 16945 I   Adreno-EGL                                   Local Patches:
08-08 01:04:53.882 16945 16945 I   Adreno-EGL                                   Reconstruct Branch:
08-08 01:04:53.912 16945 16945 W   HTCLOG                                       use specified tag [SoundPool], func [0].
08-08 01:04:53.922 16945 16945 W   HTCLOG                                       mask=0x18
08-08 01:04:53.962 16945 16945 E   SensorManager                                uid = 10216
08-08 01:04:53.972 16945 16945 E   SensorManager                                uid = 10216
08-08 01:04:53.972 16945 16945 I   SensorManager                                registerListenerImpl: listener = com.badlogic.gdx.backends.android.AndroidInput$SensorListener@2f29eac8, sensor = {Sensor name="BMA255 3-axis Accelerometer", vendor="Bosch", version=1, type=1, maxRange=39.24, resolution=0.15328126, power=0.2, minDelay=10000}, delay = 20000, handler = null
08-08 01:04:53.982 16945 16945 E   SensorManager                                uid = 10216
08-08 01:04:53.982 16945 16945 I   AndroidInput                                 sensor listener setup
08-08 01:04:54.002 16945 16974 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:04:54.002 16945 16974 W   HTCLOG                                       mask=0x18
08-08 01:04:54.002 16945 16945 W   HTCLOG                                       use specified tag [GraphicBufferMapper], func [3].
08-08 01:04:54.002 16945 16945 W   HTCLOG                                       mask=0x18
08-08 01:04:54.012 16945 16945 W   HTCLOG                                       use specified tag [qdmemalloc], func [0].
08-08 01:04:54.012 16945 16945 W   HTCLOG                                       mask=0x18
08-08 01:04:54.012 16945 16945 D   Atlas                                        Validating map...
08-08 01:04:54.052 16945 16945 D   FindExtension                                FindExtension: before mHardwareRenderer.initialize, mSurface.isValid() = true
08-08 01:04:54.052 16945 16945 W   HTCLOG                                       use specified tag [ThreadedRenderer], func [0].
08-08 01:04:54.052 16945 16945 W   HTCLOG                                       mask=0x18
08-08 01:04:54.052 16945 16945 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:04:54.052 16945 16945 W   HTCLOG                                       mask=0x18
08-08 01:04:54.052 16945 16974 I   Adreno-EGL                                   <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build:  ()
08-08 01:04:54.052 16945 16974 I   Adreno-EGL                                   OpenGL ES Shader Compiler Version: E031.25.03.04
08-08 01:04:54.052 16945 16974 I   Adreno-EGL                                   Build Date: 04/24/15 Fri
08-08 01:04:54.052 16945 16974 I   Adreno-EGL                                   Local Branch:
08-08 01:04:54.052 16945 16974 I   Adreno-EGL                                   Remote Branch:
08-08 01:04:54.052 16945 16974 I   Adreno-EGL                                   Local Patches:
08-08 01:04:54.052 16945 16974 I   Adreno-EGL                                   Reconstruct Branch:
08-08 01:04:54.082 16945 16974 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:04:54.082 16945 16974 W   HTCLOG                                       mask=0x18
08-08 01:04:54.082 16945 16974 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:04:54.082 16945 16974 W   HTCLOG                                       mask=0x18
08-08 01:04:54.082 16945 16974 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:04:54.082 16945 16974 W   HTCLOG                                       mask=0x18
08-08 01:04:54.132 16945 16969 W   GL2JNIView                                   creating OpenGL ES 2.0 context
08-08 01:04:54.142 16945 16969 I   GL2                                          all initialized 2
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              OGL renderer: Adreno (TM) 304
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              OGL vendor: Qualcomm
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              OGL version: OpenGL ES 3.0 V@100.0 AU@  (GIT@)
08-08 01:04:54.152 16945 16969 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-08 01:04:54.152 16945 16969 W   Adreno-EGL                                   <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
08-08 01:04:54.152 16945 16969 W   Adreno-EGL                                   <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              framebuffer: (5, 6, 5, 0)
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              depthbuffer: (16)
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              stencilbuffer: (0)
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              samples: (0)
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              coverage sampling: (false)
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              Managed meshes/app: { }
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              Managed textures/app: { }
08-08 01:04:54.152 16945 16969 I   AndroidGraphics                              Managed shaders/app: { }
08-08 01:04:54.162 16945 16969 I   AndroidGraphics                              Managed buffers/app: { }
08-08 01:04:54.192 16945 16974 W   HTCLOG                                       use specified tag [Surface], func [3].
08-08 01:04:54.192 16945 16974 W   HTCLOG                                       mask=0x18
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               FATAL EXCEPTION: GLThread 6519
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               Process: com.DodgeCoding.EarthCraft, PID: 16945
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: gdx-game-android/assets/buttons/playButtonsAtlas.atlas (Internal)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:77)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas$TextureAtlasData.<init>(TextureAtlas.java:103)
 08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:231)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:226)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:216)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:211)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.DodgeCoding.EarthCraft.EarthCraft.create(EarthCraft.java:38)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:236)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1511)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               Caused by: java.io.FileNotFoundException: gdx-game-android/assets/buttons/playButtonsAtlas.atlas
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at android.content.res.AssetManager.openAsset(Native Method)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at android.content.res.AssetManager.open(AssetManager.java:330)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at android.content.res.AssetManager.open(AssetManager.java:304)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:75)
08-08 01:04:54.372 16945 16969 E   AndroidRuntime                               ... 9 more
08-08 01:04:54.532 16945 16945 I   SensorManager                                unregisterListenerImpl++: listener = com.badlogic.gdx.backends.android.AndroidInput$SensorListener@2f29eac8
08-08 01:04:54.542 16945 16945 I   AndroidInput                                 sensor listener tear down
08-08 01:04:54.542 16945 16945 I   AndroidGraphics                              Managed meshes/app: { }
08-08 01:04:54.542 16945 16945 I   AndroidGraphics                              Managed textures/app: { }
08-08 01:04:54.542 16945 16945 I   AndroidGraphics                              Managed shaders/app: { }
08-08 01:04:54.542 16945 16945 I   AndroidGraphics                              Managed buffers/app: { }
08-08 01:04:56.192 16945 16969 D   Process                                      killProcess, pid=16945
08-08 01:04:56.192 16945 16969 D   Process                                      com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException:138 java.lang.ThreadGroup.uncaughtException:693 java.lang.ThreadGroup.uncaughtException:690
08-08 01:04:56.192 16945 16969 W   HTCLOG                                       use specified tag [Process], func [0].
08-08 01:04:56.192 16945 16969 W   HTCLOG                                       mask=0x18
08-08 01:06:52.022 17832 17832 I   art                                          Late-enabling -Xcheck:jni
08-08 01:06:52.022 17832 17832 I   art                                          VMHOOK: rlim_cur : 0 pid:17832
08-08 01:06:52.032 17832 17832 W   HTCLOG                                       use specified tag [FDManager], func [0].
08-08 01:06:52.032 17832 17832 W   HTCLOG                                       mask=0x18
08-08 01:06:52.252 17832 17852 I   System                                       exec(logcat -v threadtime @ adrt.ADRTLogCatReader.run:42)
08-08 01:06:52.262 17832 17832 W   HTCLOG                                       use specified tag [libEGL], func [3].
08-08 01:06:52.262 17832 17832 W   HTCLOG                                       mask=0x18
08-08 01:06:52.262 17832 17832 I   Adreno-EGL                                   <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build:  ()
08-08 01:06:52.262 17832 17832 I   Adreno-EGL                                   OpenGL ES Shader Compiler Version: E031.25.03.04
08-08 01:06:52.262 17832 17832 I   Adreno-EGL                                   Build Date: 04/24/15 Fri
08-08 01:06:52.262 17832 17832 I   Adreno-EGL                                   Local Branch:
08-08 01:06:52.262 17832 17832 I   Adreno-EGL                                   Remote Branch:
08-08 01:06:52.262 17832 17832 I   Adreno-EGL                                   Local Patches:
08-08 01:06:52.262 17832 17832 I   Adreno-EGL                                   Reconstruct Branch:
08-08 01:06:52.302 17832 17832 W   HTCLOG                                       use specified tag [SoundPool], func [0].
08-08 01:06:52.302 17832 17832 W   HTCLOG                                       mask=0x18
08-08 01:06:52.342 17832 17832 E   SensorManager                                uid = 10216
08-08 01:06:52.342 17832 17832 E   SensorManager                                uid = 10216
08-08 01:06:52.342 17832 17832 I   SensorManager                                registerListenerImpl: listener = com.badlogic.gdx.backends.android.AndroidInput$SensorListener@2f29eac8, sensor = {Sensor name="BMA255 3-axis Accelerometer", vendor="Bosch", version=1, type=1, maxRange=39.24, resolution=0.15328126, power=0.2, minDelay=10000}, delay = 20000, handler = null
08-08 01:06:52.362 17832 17832 E   SensorManager                                uid = 10216
08-08 01:06:52.362 17832 17832 I   AndroidInput                                 sensor listener setup
08-08 01:06:52.372 17832 17861 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:06:52.372 17832 17861 W   HTCLOG                                       mask=0x18
08-08 01:06:52.382 17832 17832 W   HTCLOG                                       use specified tag [GraphicBufferMapper], func [3].
08-08 01:06:52.382 17832 17832 W   HTCLOG                                       mask=0x18
08-08 01:06:52.382 17832 17832 W   HTCLOG                                       use specified tag [qdmemalloc], func [0].
08-08 01:06:52.382 17832 17832 W   HTCLOG                                       mask=0x18
08-08 01:06:52.382 17832 17832 D   Atlas                                        Validating map...
08-08 01:06:52.442 17832 17832 D   FindExtension                                FindExtension: before mHardwareRenderer.initialize, mSurface.isValid() = true
08-08 01:06:52.442 17832 17832 W   HTCLOG                                       use specified tag [ThreadedRenderer], func [0].
08-08 01:06:52.442 17832 17832 W   HTCLOG                                       mask=0x18
08-08 01:06:52.442 17832 17832 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:06:52.442 17832 17832 W   HTCLOG                                       mask=0x18
08-08 01:06:52.442 17832 17861 I   Adreno-EGL                                   <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build:  ()
08-08 01:06:52.442 17832 17861 I   Adreno-EGL                                   OpenGL ES Shader Compiler Version: E031.25.03.04
08-08 01:06:52.442 17832 17861 I   Adreno-EGL                                   Build Date: 04/24/15 Fri
08-08 01:06:52.442 17832 17861 I   Adreno-EGL                                   Local Branch:
08-08 01:06:52.442 17832 17861 I   Adreno-EGL                                   Remote Branch:
08-08 01:06:52.442 17832 17861 I   Adreno-EGL                                   Local Patches:
08-08 01:06:52.442 17832 17861 I   Adreno-EGL                                   Reconstruct Branch:
08-08 01:06:52.462 17832 17861 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:06:52.462 17832 17861 W   HTCLOG                                       mask=0x18
08-08 01:06:52.462 17832 17861 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:06:52.462 17832 17861 W   HTCLOG                                       mask=0x18
08-08 01:06:52.472 17832 17861 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:06:52.472 17832 17861 W   HTCLOG                                       mask=0x18
08-08 01:06:52.512 17832 17856 W   GL2JNIView                                   creating OpenGL ES 2.0 context
08-08 01:06:52.532 17832 17856 I   GL2                                          all initialized 2
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              OGL renderer: Adreno (TM) 304
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              OGL vendor: Qualcomm
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              OGL version: OpenGL ES 3.0 V@100.0 AU@  (GIT@)
08-08 01:06:52.532 17832 17856 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-08 01:06:52.532 17832 17856 W   Adreno-EGL                                   <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
08-08 01:06:52.532 17832 17856 W   Adreno-EGL                                   <qeglDrvAPI_eglGetConfigAttrib:607>: EGL_BAD_ATTRIBUTE
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              framebuffer: (5, 6, 5, 0)
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              depthbuffer: (16)
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              stencilbuffer: (0)
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              samples: (0)
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              coverage sampling: (false)
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              Managed meshes/app: { }
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              Managed textures/app: { }
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              Managed shaders/app: { }
08-08 01:06:52.532 17832 17856 I   AndroidGraphics                              Managed buffers/app: { }
08-08 01:06:52.572 17832 17861 W   HTCLOG                                       use specified tag [Surface], func [3].
08-08 01:06:52.572 17832 17861 W   HTCLOG                                       mask=0x18
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               FATAL EXCEPTION: GLThread 6640
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               Process: com.DodgeCoding.EarthCraft, PID: 17832
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: playButtonsAtlas.atlas (Internal)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:77)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas$TextureAtlasData.<init>(TextureAtlas.java:103)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:231)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:226)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at com.badlogic.gdx.graphics.g2d.TextureAtlas.<init>(TextureAtlas.java:216)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at com.DodgeCoding.EarthCraft.EarthCraft.create(EarthCraft.java:38)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:236)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1511)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               Caused by: java.io.FileNotFoundException: playButtonsAtlas.atlas
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at android.content.res.AssetManager.openAsset(Native Method)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at android.content.res.AssetManager.open(AssetManager.java:330)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at android.content.res.AssetManager.open(AssetManager.java:304)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:75)
08-08 01:06:52.772 17832 17856 E   AndroidRuntime                               ... 8 more
08-08 01:06:52.872 17832 17861 W   HTCLOG                                       use specified tag [OpenGLRenderer], func [3].
08-08 01:06:52.872 17832 17861 W   HTCLOG                                       mask=0x18
08-08 01:06:52.972 17832 17832 I   SensorManager                                unregisterListenerImpl++: listener = com.badlogic.gdx.backends.android.AndroidInput$SensorListener@2f29eac8
08-08 01:06:52.982 17832 17832 I   AndroidInput                                 sensor listener tear down
08-08 01:06:52.982 17832 17832 I   AndroidGraphics                              Managed meshes/app: { }
08-08 01:06:52.982 17832 17832 I   AndroidGraphics                              Managed textures/app: { }
08-08 01:06:52.982 17832 17832 I   AndroidGraphics                              Managed shaders/app: { }
08-08 01:06:52.982 17832 17832 I   AndroidGraphics                                  Managed buffers/app: { }
DodgeCoder
  • 17
  • 7
  • @Talha I don't know what log cat is, I used a TextButton example from a different question on this site as a guide to this code – DodgeCoder Aug 05 '16 at 07:15
  • The error window below (in Android Studio) where your exception is shown in RED color text, starting with time frame like 11:09:34.106.... – Talha Aug 05 '16 at 07:25
  • 1
    @DodgeCoder, Talha is basically asking for the error messages that you get - if the app is crashing, what is the exception you see? – Eric Aug 05 '16 at 07:26
  • @munyul I'm not using Android Studio to test it, I'm using my phone to create, compile and test my code bc my laptop charger broke and I don't have another CPU – DodgeCoder Aug 05 '16 at 15:01
  • @Talha so I found the log, now what? – DodgeCoder Aug 08 '16 at 05:48
  • It says it cannot find your file see : `Caused by: java.io.FileNotFoundException: gdx-game-android/assets/buttons/playButtonsAtlas.atlas` The line `Gdx.files.internal()` is throwing this exception probably. Were you able to understand the problem at first? – Talha Aug 08 '16 at 05:57
  • In which directory your atlas file is present? Also check if you can put these files in `/assets` folder and retrieve them using `AssetManager` class, then try. See this [code for example](http://stackoverflow.com/questions/38803675/how-to-build-a-resourcemanager-in-libgdx-with-assetmanager/38814671#38814671). – Talha Aug 08 '16 at 11:53
  • @Talha the atlas is in the same place as the playButton.png and the main_menu.png which is the assets folder, not the buttons folder in the assets folder. I have no clue why it still says it's in there – DodgeCoder Aug 08 '16 at 23:03

0 Answers0