Libgdx Not Using Android Asset Folder
I am having a problem with a libGDX project reading the assets folder when compiling the Android or IOS build. While trying to access a file in the assets folder under the android
Solution 1:
In case if you are using Android Studio, select edit config...
Change 'Desktop Application' -> 'Working Directory' to your android asset forlder
Solution 2:
You should use Gdx.file.internal();
https://github.com/libgdx/libgdx/wiki/File-handling#reading-from-a-file
If you used the [setup UI | Project Setup, Running & Debugging], this file will be contained in your Android project's assets folder, $ANDROID_PROJECT/assets/data to be exact. Your desktop and html projects link to this folder in Eclipse, and will pick it up automatically when executed from within Eclipse.
Post a Comment for "Libgdx Not Using Android Asset Folder"