Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LibGDX project can't find assets folder

I have suddenly run into an issue with my build environment and I can't figure out why. I can run my project just fine using gradlew desktop:run however, when I try to run the project from Eclipse using right-click run as desktop application (on the desktop project of course) it suddenly cannot find my pack.atlas file. There is no doubt the file exsts. I have refreshed my eclipse project multiple times and the project runs fine using gradle commandline. It was working fine yesterday. The only thing I can think of that made it mess up was I ran a Gradle command from within the IDE yesterday but I'm not sure how it could have got messed up like this. It is important for me to figure out this issue as I cannot use the Eclipse debugger with this error. Does anyone have any guess as to why Eclipse isn't seeing the assets folder?

like image 415
Barodapride Avatar asked Oct 04 '14 17:10

Barodapride


Video Answer


1 Answers

Probably your assets from the android project is not correctly linked with the desktop project.

Your linked assets folder from inside the desktop project should look like this: enter image description here

If it doesn't(or it doesn't exists) ,delete the folder(in the desktop project),and go to the the project properties->java build path->source->link source

enter image description here

browse->[select the asset folder inside the android project]->finish

enter image description here

like image 115
SteveL Avatar answered Oct 21 '22 22:10

SteveL