0
我决定从Eclipse转移到Android Studio。我从levelsList.cfg中读取了关卡的列表。它在我的核心模块中。从Android Studio中的类路径读取文件(LibGDX)
FileHandle cfgFile = Gdx.files.classpath("levelsList.cfg");
reader = cfgFile.reader(256);
它在Eclipse中工作得很好。在Android Studio中我有
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: File not found: levelsList.cfg (Classpath)
问题是将这些信息保存在资产中并不安全。拥有扎根android的每个人都可以在那里更改数据。 –