Search code examples
android-studiolibgdxlocationserializable

Location of serializable file in Android Studio using libgdx


I am using android studio 1.0.2 I have a class "Player" which I want to save in order to do that i use FileHandle file = Gdx.files.local("players.dat");

Later I changed Player class a little bit so I need to delete the old "players.dat" file manually and let program create new one.

My problem is I don't know where should I look for "player.dat" file. Does someone know the path to players.dat file ? I don't know where FileHandle create that file. Here's the structure of my project there are so many files I can't find it

https://i.sstatic.net/bU2uL.png


Solution

  • You could use this:

    Gdx.files.local("players.dat").delete();

    in another way.

    for example delete manual in Desktop:

    ../yourFolderProyect/desktop/players.dat

    you may want to read this: https://github.com/libgdx/libgdx/wiki/File-handling