com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: - Error

后端 未结 3 1714
日久生厌
日久生厌 2020-12-22 11:02

I am trying to develop an application in libGDX for iOS.

In my Java class I have written this line

private Texture texture = new Texture(Gdx.files.in         


        
相关标签:
3条回答
  • 2020-12-22 11:04

    I also suffer this problem,I seemingly solve it. That is:I get GDX project from excuting gdx-setup.jar,and obtain all so files in lib directroy. that's all!

    0 讨论(0)
  • 2020-12-22 11:05

    You've got the error right in front of you...

     <directory>../android/assets</directory>
    

    the resource you are looking for is NOT in the "data" folder. It's in the "Assets" which is in the android project.

    Also when loading textures you don't need to use a FileHandler.. This would be enough:

    texture = new Texture("image.png");
    

    which would be the root (assets) folder of the android project

    0 讨论(0)
  • 2020-12-22 11:14

    I had the same issue. I have cleaned and rebuild the project, and after that it works fine for me.

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