3
我想反序列化我在Android上的游戏数据。我的资产文件夹中有gamadata.dat文件,但我保留FileNotFoundException
。Libgdx系列化
FileHandle fl = Gdx.files.internal("gamedata.dat");
ObjectInputStream in = new ObjectInputStream(new FileInputStream(fl.file()));
AllData data = (AllData) in.readObject();
in.close();
那么,为什么我有这个例外?
问候
你使用的Eclipse?你有没有在eclipse中检查assets文件夹以确保它在那里?否则,您可能需要在eclipse中刷新文件夹。 – noone
是的,我使用Eclipse,它是资产的文件夹,但它仍然没有找到 – Suwer
IMO这应该工作...你拿到Android上的异常?桌面?都? – noone