Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Image doesn't load when running Desktop Launcher and error appears

+2 votes
I am using a Mac to run this environment and whenever I try running this project fresh from LibGDX it will not load saying it cannot load the image.
asked Sep 1 in CSC 285 (F17) by Daniel Zwiener (3,260 points)

1 Answer

+2 votes
Best answer
"If we just run it, you will get an error: Couldn't load file: badlogic.jpg. You have to edit your Run Configurations first: Select as working directory PATH_TO_YOUR_PROJECT\drop\android\assets.​" -https://github.com/libgdx/libgdx/wiki/A-simple-game​

In order to achieve this just click on the arrow next to the green run button then select run configurations...> Arguments > Working Directory > Other > Folder which contains the assets.
answered Sep 1 by Daniel Zwiener (3,260 points)
selected Sep 2 by Daniel Zwiener
Note that for our case, it would be "core/assets", since we aren't supporting Android.