Libgdx project Exception in thread “LWJGL Application”. Couldn't load file. Error log inside

前端 未结 4 1114
情书的邮戳
情书的邮戳 2021-02-06 05:11

I am a newbie in libgdx and just got it setup in android studio. Now I am getting this error when I press run for the first time.

/Library/Java/Jav         


        
相关标签:
4条回答
  • 2021-02-06 05:29

    I had the same issue. Tried the previously stated solutions with no luck. I ended up renaming the filename and miraculously it worked.

    0 讨论(0)
  • 2021-02-06 05:30

    In my case installing nvidia-375 driver solved the issue.

    sudo add-apt-repository ppa:graphics-drivers/ppa
    sudo apt-get update
    sudo apt-get install nvidia-375
    

    reboot. And then ta-da! It's working.

    0 讨论(0)
  • 2021-02-06 05:49

    Are you run Desktop Application? Make sure you link your desktop assets to android assets folder?

    On Eclipse : New libgdx setup receive file not found

    Edited:

    On Android Studio

    Choose Edit Configuration.. => "Working directory" => Change folder to android/assets

    Edit Configuration.. Edit Configuration2

    0 讨论(0)
  • 2021-02-06 05:53
    static{
        System.out.println(Gdx.files.getLocalStoragePath());
    }
    

    It displayed the path to the project root folder outside the android/desktop specific modules. Copied to files to a path relative to the root folder of project and it worked.

    Project Project/core Project/android Project/desktop Project/html Project/android/assets/data/img.png What worked: Project/data/img.png

    0 讨论(0)
提交回复
热议问题