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的每個人都可以在那裏更改數據。 –