Sound file runs fine on Desktop with LibGDX, but crashes on android device












0















Right now, I am programming a video game in Android Studio with LibGDX that can run on both Desktop and Android devices.



In certain parts of the game, I want to play a sound effect using a Sound variable:



public Sound sound5;


In the show() function of the Screen, I am initializing the sound by setting the path to the sound effect audio file:



sound5 = Gdx.audio.newSound(Gdx.files.internal("C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav"));


Then, in the hide() function, I dispose the sound variable:



sound5.dispose();


In one of my button's functions, I play the sound:



sound5.play();


When I run my game on Desktop, the game runs perfectly fine and plays the sound file whenever I press a button, but when I try to run my game on an Android device, the game crashes with a FileNotFoundException as soon as it starts up. Here is the log for the crash:



E/AndroidRuntime: FATAL EXCEPTION: GLThread 24292
Process: com.efe.gamedev.catacombs, PID: 24651
com.badlogic.gdx.utils.GdxRuntimeException: Error loading audio file: C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav
Note: Internal audio files must be placed in the assets directory.
at com.badlogic.gdx.backends.android.AndroidAudio.newSound(AndroidAudio.java:181)
at com.efe.gamedev.catacombs.MenuScreen.show(MenuScreen.java:117)
at com.badlogic.gdx.Game.setScreen(Game.java:61)
at com.efe.gamedev.catacombs.CatacombsGame.showMenuScreen(CatacombsGame.java:25)
at com.efe.gamedev.catacombs.CatacombsGame.create(CatacombsGame.java:20)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1537)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253)
Caused by: java.io.FileNotFoundException: C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav
at android.content.res.AssetManager.openAssetFd(Native Method)
at android.content.res.AssetManager.openFd(AssetManager.java:370)
at com.badlogic.gdx.backends.android.AndroidFileHandle.getAssetFileDescriptor(AndroidFileHandle.java:237)
at com.badlogic.gdx.backends.android.AndroidAudio.newSound(AndroidAudio.java:176)
at com.efe.gamedev.catacombs.MenuScreen.show(MenuScreen.java:117) 
at com.badlogic.gdx.Game.setScreen(Game.java:61) 
at com.efe.gamedev.catacombs.CatacombsGame.showMenuScreen(CatacombsGame.java:25) 
at com.efe.gamedev.catacombs.CatacombsGame.create(CatacombsGame.java:20) 
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311) 
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1537) 
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253) 


The audio file "nff_confirm_02.wav" does exist in the raw folder inside of my res folder. The file name does not have any capitals or spaces, so that shouldn't be a problem.



I have tried multiple file paths to the audio file, like:



sound5 = Gdx.audio.newSound(Gdx.files.internal("android/res/raw/nff_confirm_02.wav"));


or just:



sound5 = Gdx.audio.newSound(Gdx.files.internal("raw/nff_confirm_02.wav"));


However, both must be incorrect because the game crashes on both Desktop and Android.
I am not sure what I need to do to prevent the Android device from giving me a FileNotFoundException.



By the way, I looked in the log for the crash, and I found that it said:



Note: Internal audio files must be placed in the assets directory.


There is an "assets" directory in the android directory of my LibGDX project, but whenever I try to paste the audio file that I am using into the assets directory, it automatically puts the file into the "res" directory in the android directory, so I didn't think that was the problem.



Any advice is welcome to help me be able to play a sound file in LibGDX, without my file path giving me a FileNotFoundException.










share|improve this question



























    0















    Right now, I am programming a video game in Android Studio with LibGDX that can run on both Desktop and Android devices.



    In certain parts of the game, I want to play a sound effect using a Sound variable:



    public Sound sound5;


    In the show() function of the Screen, I am initializing the sound by setting the path to the sound effect audio file:



    sound5 = Gdx.audio.newSound(Gdx.files.internal("C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav"));


    Then, in the hide() function, I dispose the sound variable:



    sound5.dispose();


    In one of my button's functions, I play the sound:



    sound5.play();


    When I run my game on Desktop, the game runs perfectly fine and plays the sound file whenever I press a button, but when I try to run my game on an Android device, the game crashes with a FileNotFoundException as soon as it starts up. Here is the log for the crash:



    E/AndroidRuntime: FATAL EXCEPTION: GLThread 24292
    Process: com.efe.gamedev.catacombs, PID: 24651
    com.badlogic.gdx.utils.GdxRuntimeException: Error loading audio file: C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav
    Note: Internal audio files must be placed in the assets directory.
    at com.badlogic.gdx.backends.android.AndroidAudio.newSound(AndroidAudio.java:181)
    at com.efe.gamedev.catacombs.MenuScreen.show(MenuScreen.java:117)
    at com.badlogic.gdx.Game.setScreen(Game.java:61)
    at com.efe.gamedev.catacombs.CatacombsGame.showMenuScreen(CatacombsGame.java:25)
    at com.efe.gamedev.catacombs.CatacombsGame.create(CatacombsGame.java:20)
    at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1537)
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253)
    Caused by: java.io.FileNotFoundException: C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav
    at android.content.res.AssetManager.openAssetFd(Native Method)
    at android.content.res.AssetManager.openFd(AssetManager.java:370)
    at com.badlogic.gdx.backends.android.AndroidFileHandle.getAssetFileDescriptor(AndroidFileHandle.java:237)
    at com.badlogic.gdx.backends.android.AndroidAudio.newSound(AndroidAudio.java:176)
    at com.efe.gamedev.catacombs.MenuScreen.show(MenuScreen.java:117) 
    at com.badlogic.gdx.Game.setScreen(Game.java:61) 
    at com.efe.gamedev.catacombs.CatacombsGame.showMenuScreen(CatacombsGame.java:25) 
    at com.efe.gamedev.catacombs.CatacombsGame.create(CatacombsGame.java:20) 
    at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311) 
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1537) 
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253) 


    The audio file "nff_confirm_02.wav" does exist in the raw folder inside of my res folder. The file name does not have any capitals or spaces, so that shouldn't be a problem.



    I have tried multiple file paths to the audio file, like:



    sound5 = Gdx.audio.newSound(Gdx.files.internal("android/res/raw/nff_confirm_02.wav"));


    or just:



    sound5 = Gdx.audio.newSound(Gdx.files.internal("raw/nff_confirm_02.wav"));


    However, both must be incorrect because the game crashes on both Desktop and Android.
    I am not sure what I need to do to prevent the Android device from giving me a FileNotFoundException.



    By the way, I looked in the log for the crash, and I found that it said:



    Note: Internal audio files must be placed in the assets directory.


    There is an "assets" directory in the android directory of my LibGDX project, but whenever I try to paste the audio file that I am using into the assets directory, it automatically puts the file into the "res" directory in the android directory, so I didn't think that was the problem.



    Any advice is welcome to help me be able to play a sound file in LibGDX, without my file path giving me a FileNotFoundException.










    share|improve this question

























      0












      0








      0








      Right now, I am programming a video game in Android Studio with LibGDX that can run on both Desktop and Android devices.



      In certain parts of the game, I want to play a sound effect using a Sound variable:



      public Sound sound5;


      In the show() function of the Screen, I am initializing the sound by setting the path to the sound effect audio file:



      sound5 = Gdx.audio.newSound(Gdx.files.internal("C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav"));


      Then, in the hide() function, I dispose the sound variable:



      sound5.dispose();


      In one of my button's functions, I play the sound:



      sound5.play();


      When I run my game on Desktop, the game runs perfectly fine and plays the sound file whenever I press a button, but when I try to run my game on an Android device, the game crashes with a FileNotFoundException as soon as it starts up. Here is the log for the crash:



      E/AndroidRuntime: FATAL EXCEPTION: GLThread 24292
      Process: com.efe.gamedev.catacombs, PID: 24651
      com.badlogic.gdx.utils.GdxRuntimeException: Error loading audio file: C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav
      Note: Internal audio files must be placed in the assets directory.
      at com.badlogic.gdx.backends.android.AndroidAudio.newSound(AndroidAudio.java:181)
      at com.efe.gamedev.catacombs.MenuScreen.show(MenuScreen.java:117)
      at com.badlogic.gdx.Game.setScreen(Game.java:61)
      at com.efe.gamedev.catacombs.CatacombsGame.showMenuScreen(CatacombsGame.java:25)
      at com.efe.gamedev.catacombs.CatacombsGame.create(CatacombsGame.java:20)
      at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311)
      at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1537)
      at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253)
      Caused by: java.io.FileNotFoundException: C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav
      at android.content.res.AssetManager.openAssetFd(Native Method)
      at android.content.res.AssetManager.openFd(AssetManager.java:370)
      at com.badlogic.gdx.backends.android.AndroidFileHandle.getAssetFileDescriptor(AndroidFileHandle.java:237)
      at com.badlogic.gdx.backends.android.AndroidAudio.newSound(AndroidAudio.java:176)
      at com.efe.gamedev.catacombs.MenuScreen.show(MenuScreen.java:117) 
      at com.badlogic.gdx.Game.setScreen(Game.java:61) 
      at com.efe.gamedev.catacombs.CatacombsGame.showMenuScreen(CatacombsGame.java:25) 
      at com.efe.gamedev.catacombs.CatacombsGame.create(CatacombsGame.java:20) 
      at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311) 
      at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1537) 
      at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253) 


      The audio file "nff_confirm_02.wav" does exist in the raw folder inside of my res folder. The file name does not have any capitals or spaces, so that shouldn't be a problem.



      I have tried multiple file paths to the audio file, like:



      sound5 = Gdx.audio.newSound(Gdx.files.internal("android/res/raw/nff_confirm_02.wav"));


      or just:



      sound5 = Gdx.audio.newSound(Gdx.files.internal("raw/nff_confirm_02.wav"));


      However, both must be incorrect because the game crashes on both Desktop and Android.
      I am not sure what I need to do to prevent the Android device from giving me a FileNotFoundException.



      By the way, I looked in the log for the crash, and I found that it said:



      Note: Internal audio files must be placed in the assets directory.


      There is an "assets" directory in the android directory of my LibGDX project, but whenever I try to paste the audio file that I am using into the assets directory, it automatically puts the file into the "res" directory in the android directory, so I didn't think that was the problem.



      Any advice is welcome to help me be able to play a sound file in LibGDX, without my file path giving me a FileNotFoundException.










      share|improve this question














      Right now, I am programming a video game in Android Studio with LibGDX that can run on both Desktop and Android devices.



      In certain parts of the game, I want to play a sound effect using a Sound variable:



      public Sound sound5;


      In the show() function of the Screen, I am initializing the sound by setting the path to the sound effect audio file:



      sound5 = Gdx.audio.newSound(Gdx.files.internal("C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav"));


      Then, in the hide() function, I dispose the sound variable:



      sound5.dispose();


      In one of my button's functions, I play the sound:



      sound5.play();


      When I run my game on Desktop, the game runs perfectly fine and plays the sound file whenever I press a button, but when I try to run my game on an Android device, the game crashes with a FileNotFoundException as soon as it starts up. Here is the log for the crash:



      E/AndroidRuntime: FATAL EXCEPTION: GLThread 24292
      Process: com.efe.gamedev.catacombs, PID: 24651
      com.badlogic.gdx.utils.GdxRuntimeException: Error loading audio file: C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav
      Note: Internal audio files must be placed in the assets directory.
      at com.badlogic.gdx.backends.android.AndroidAudio.newSound(AndroidAudio.java:181)
      at com.efe.gamedev.catacombs.MenuScreen.show(MenuScreen.java:117)
      at com.badlogic.gdx.Game.setScreen(Game.java:61)
      at com.efe.gamedev.catacombs.CatacombsGame.showMenuScreen(CatacombsGame.java:25)
      at com.efe.gamedev.catacombs.CatacombsGame.create(CatacombsGame.java:20)
      at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311)
      at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1537)
      at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253)
      Caused by: java.io.FileNotFoundException: C:/Users/coder/Desktop/Catacombs - Copy/android/res/raw/nff_confirm_02.wav
      at android.content.res.AssetManager.openAssetFd(Native Method)
      at android.content.res.AssetManager.openFd(AssetManager.java:370)
      at com.badlogic.gdx.backends.android.AndroidFileHandle.getAssetFileDescriptor(AndroidFileHandle.java:237)
      at com.badlogic.gdx.backends.android.AndroidAudio.newSound(AndroidAudio.java:176)
      at com.efe.gamedev.catacombs.MenuScreen.show(MenuScreen.java:117) 
      at com.badlogic.gdx.Game.setScreen(Game.java:61) 
      at com.efe.gamedev.catacombs.CatacombsGame.showMenuScreen(CatacombsGame.java:25) 
      at com.efe.gamedev.catacombs.CatacombsGame.create(CatacombsGame.java:20) 
      at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311) 
      at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1537) 
      at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253) 


      The audio file "nff_confirm_02.wav" does exist in the raw folder inside of my res folder. The file name does not have any capitals or spaces, so that shouldn't be a problem.



      I have tried multiple file paths to the audio file, like:



      sound5 = Gdx.audio.newSound(Gdx.files.internal("android/res/raw/nff_confirm_02.wav"));


      or just:



      sound5 = Gdx.audio.newSound(Gdx.files.internal("raw/nff_confirm_02.wav"));


      However, both must be incorrect because the game crashes on both Desktop and Android.
      I am not sure what I need to do to prevent the Android device from giving me a FileNotFoundException.



      By the way, I looked in the log for the crash, and I found that it said:



      Note: Internal audio files must be placed in the assets directory.


      There is an "assets" directory in the android directory of my LibGDX project, but whenever I try to paste the audio file that I am using into the assets directory, it automatically puts the file into the "res" directory in the android directory, so I didn't think that was the problem.



      Any advice is welcome to help me be able to play a sound file in LibGDX, without my file path giving me a FileNotFoundException.







      javascript android-studio libgdx






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 25 '18 at 4:24









      Acer DashAcer Dash

      31




      31
























          1 Answer
          1






          active

          oldest

          votes


















          2














          All your assets should be inside assets folder of android module in LibGDX project.



          Please take a look of Project Explorer :



          enter image description here



          Create sound object in this way whenever you want :



          Sound sound = Gdx.audio.newSound(Gdx.files.internal("sounds/nff_confirm_02.wav"));
          sound.play();


          For Desktop, Configuration should be like this :



          enter image description here



          Cross check Working directory path.






          share|improve this answer


























          • I'm sorry, but I don't see a Working directory path in my Desktop Configuration. I am using Android Studio 3.0.1, which is not the latest version. Is that the problem?

            – Acer Dash
            Nov 28 '18 at 15:50













          • I just updated to Android Studio 3.2.1, and I still don't see a Working Directory option in Desktop Configuration. My Gradle version is 3.3, which is not the latest version. Is that affecting why I can't see the Working directory path?

            – Acer Dash
            Nov 29 '18 at 3:18













          • can you share configuration, what you've ??

            – Aryan
            Nov 29 '18 at 4:55











          • Okay, it ended up that the reason that all my files that I put in the "assets" folder automatically went to the "res" folder, was because I was making the "sounds" folder be an android resource directory with a raw resource type. I fixed it by making the "sounds" folder by a normal directory, which was a very simple fix.

            – Acer Dash
            Nov 29 '18 at 5:33











          • I got it to work. Thank you so much for your time.

            – Acer Dash
            Nov 29 '18 at 5:34











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53464638%2fsound-file-runs-fine-on-desktop-with-libgdx-but-crashes-on-android-device%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          All your assets should be inside assets folder of android module in LibGDX project.



          Please take a look of Project Explorer :



          enter image description here



          Create sound object in this way whenever you want :



          Sound sound = Gdx.audio.newSound(Gdx.files.internal("sounds/nff_confirm_02.wav"));
          sound.play();


          For Desktop, Configuration should be like this :



          enter image description here



          Cross check Working directory path.






          share|improve this answer


























          • I'm sorry, but I don't see a Working directory path in my Desktop Configuration. I am using Android Studio 3.0.1, which is not the latest version. Is that the problem?

            – Acer Dash
            Nov 28 '18 at 15:50













          • I just updated to Android Studio 3.2.1, and I still don't see a Working Directory option in Desktop Configuration. My Gradle version is 3.3, which is not the latest version. Is that affecting why I can't see the Working directory path?

            – Acer Dash
            Nov 29 '18 at 3:18













          • can you share configuration, what you've ??

            – Aryan
            Nov 29 '18 at 4:55











          • Okay, it ended up that the reason that all my files that I put in the "assets" folder automatically went to the "res" folder, was because I was making the "sounds" folder be an android resource directory with a raw resource type. I fixed it by making the "sounds" folder by a normal directory, which was a very simple fix.

            – Acer Dash
            Nov 29 '18 at 5:33











          • I got it to work. Thank you so much for your time.

            – Acer Dash
            Nov 29 '18 at 5:34
















          2














          All your assets should be inside assets folder of android module in LibGDX project.



          Please take a look of Project Explorer :



          enter image description here



          Create sound object in this way whenever you want :



          Sound sound = Gdx.audio.newSound(Gdx.files.internal("sounds/nff_confirm_02.wav"));
          sound.play();


          For Desktop, Configuration should be like this :



          enter image description here



          Cross check Working directory path.






          share|improve this answer


























          • I'm sorry, but I don't see a Working directory path in my Desktop Configuration. I am using Android Studio 3.0.1, which is not the latest version. Is that the problem?

            – Acer Dash
            Nov 28 '18 at 15:50













          • I just updated to Android Studio 3.2.1, and I still don't see a Working Directory option in Desktop Configuration. My Gradle version is 3.3, which is not the latest version. Is that affecting why I can't see the Working directory path?

            – Acer Dash
            Nov 29 '18 at 3:18













          • can you share configuration, what you've ??

            – Aryan
            Nov 29 '18 at 4:55











          • Okay, it ended up that the reason that all my files that I put in the "assets" folder automatically went to the "res" folder, was because I was making the "sounds" folder be an android resource directory with a raw resource type. I fixed it by making the "sounds" folder by a normal directory, which was a very simple fix.

            – Acer Dash
            Nov 29 '18 at 5:33











          • I got it to work. Thank you so much for your time.

            – Acer Dash
            Nov 29 '18 at 5:34














          2












          2








          2







          All your assets should be inside assets folder of android module in LibGDX project.



          Please take a look of Project Explorer :



          enter image description here



          Create sound object in this way whenever you want :



          Sound sound = Gdx.audio.newSound(Gdx.files.internal("sounds/nff_confirm_02.wav"));
          sound.play();


          For Desktop, Configuration should be like this :



          enter image description here



          Cross check Working directory path.






          share|improve this answer















          All your assets should be inside assets folder of android module in LibGDX project.



          Please take a look of Project Explorer :



          enter image description here



          Create sound object in this way whenever you want :



          Sound sound = Gdx.audio.newSound(Gdx.files.internal("sounds/nff_confirm_02.wav"));
          sound.play();


          For Desktop, Configuration should be like this :



          enter image description here



          Cross check Working directory path.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 26 '18 at 9:10

























          answered Nov 26 '18 at 8:26









          AryanAryan

          15k73248




          15k73248













          • I'm sorry, but I don't see a Working directory path in my Desktop Configuration. I am using Android Studio 3.0.1, which is not the latest version. Is that the problem?

            – Acer Dash
            Nov 28 '18 at 15:50













          • I just updated to Android Studio 3.2.1, and I still don't see a Working Directory option in Desktop Configuration. My Gradle version is 3.3, which is not the latest version. Is that affecting why I can't see the Working directory path?

            – Acer Dash
            Nov 29 '18 at 3:18













          • can you share configuration, what you've ??

            – Aryan
            Nov 29 '18 at 4:55











          • Okay, it ended up that the reason that all my files that I put in the "assets" folder automatically went to the "res" folder, was because I was making the "sounds" folder be an android resource directory with a raw resource type. I fixed it by making the "sounds" folder by a normal directory, which was a very simple fix.

            – Acer Dash
            Nov 29 '18 at 5:33











          • I got it to work. Thank you so much for your time.

            – Acer Dash
            Nov 29 '18 at 5:34



















          • I'm sorry, but I don't see a Working directory path in my Desktop Configuration. I am using Android Studio 3.0.1, which is not the latest version. Is that the problem?

            – Acer Dash
            Nov 28 '18 at 15:50













          • I just updated to Android Studio 3.2.1, and I still don't see a Working Directory option in Desktop Configuration. My Gradle version is 3.3, which is not the latest version. Is that affecting why I can't see the Working directory path?

            – Acer Dash
            Nov 29 '18 at 3:18













          • can you share configuration, what you've ??

            – Aryan
            Nov 29 '18 at 4:55











          • Okay, it ended up that the reason that all my files that I put in the "assets" folder automatically went to the "res" folder, was because I was making the "sounds" folder be an android resource directory with a raw resource type. I fixed it by making the "sounds" folder by a normal directory, which was a very simple fix.

            – Acer Dash
            Nov 29 '18 at 5:33











          • I got it to work. Thank you so much for your time.

            – Acer Dash
            Nov 29 '18 at 5:34

















          I'm sorry, but I don't see a Working directory path in my Desktop Configuration. I am using Android Studio 3.0.1, which is not the latest version. Is that the problem?

          – Acer Dash
          Nov 28 '18 at 15:50







          I'm sorry, but I don't see a Working directory path in my Desktop Configuration. I am using Android Studio 3.0.1, which is not the latest version. Is that the problem?

          – Acer Dash
          Nov 28 '18 at 15:50















          I just updated to Android Studio 3.2.1, and I still don't see a Working Directory option in Desktop Configuration. My Gradle version is 3.3, which is not the latest version. Is that affecting why I can't see the Working directory path?

          – Acer Dash
          Nov 29 '18 at 3:18







          I just updated to Android Studio 3.2.1, and I still don't see a Working Directory option in Desktop Configuration. My Gradle version is 3.3, which is not the latest version. Is that affecting why I can't see the Working directory path?

          – Acer Dash
          Nov 29 '18 at 3:18















          can you share configuration, what you've ??

          – Aryan
          Nov 29 '18 at 4:55





          can you share configuration, what you've ??

          – Aryan
          Nov 29 '18 at 4:55













          Okay, it ended up that the reason that all my files that I put in the "assets" folder automatically went to the "res" folder, was because I was making the "sounds" folder be an android resource directory with a raw resource type. I fixed it by making the "sounds" folder by a normal directory, which was a very simple fix.

          – Acer Dash
          Nov 29 '18 at 5:33





          Okay, it ended up that the reason that all my files that I put in the "assets" folder automatically went to the "res" folder, was because I was making the "sounds" folder be an android resource directory with a raw resource type. I fixed it by making the "sounds" folder by a normal directory, which was a very simple fix.

          – Acer Dash
          Nov 29 '18 at 5:33













          I got it to work. Thank you so much for your time.

          – Acer Dash
          Nov 29 '18 at 5:34





          I got it to work. Thank you so much for your time.

          – Acer Dash
          Nov 29 '18 at 5:34


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53464638%2fsound-file-runs-fine-on-desktop-with-libgdx-but-crashes-on-android-device%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)