android - libgdx sharedPreferences -
i have been struggling long. can 1 take @ code , tell why cannot find saved file.
public static void save(){ try{ filehandle filehandle = gdx.files.local("data/testscore.xml"); filehandle.writestring("test", false); gdx.app.log("settings", "saved " ); boolean exists = gdx.files.internal("testscore.xml").exists(); gdx.app.log("settings", "loaded " + exists); }catch(throwable e){ gdx.app.log("settings", "not saved " + e); } }
my log cat
04-04 17:31:18.863: i/settings(14274): saved 04-04 17:31:18.873: i/settings(14274): loaded false
fixed
boolean exists = gdx.files.local("data/testscore.xml").exists();
Comments
Post a Comment