Loading files from c++ using android ndk

  • Hello

    I have built a game that is working in Windows. It loads multiple XML-files that define game maps. The files are stored in the data folder together with the res.xml and I use pugi XML to read the files. Now I am migrating to android using Android studio and ndk (as the oxygine Hello world android example). I have managed to build the project. The XML files are located in the assets project folder (once again, together with the rest.xml file). After the build I can see that they are included in the apk-file.
    The game starts (I see this in the debugger) and the res.xml file is successfully loaded but when my code reads the additional XML files, the pugi reader says that the file is not found. Do I have to do anything special to access these files?

  • Never mind. Did exactly as it says in the the Filesystem article of the Oxygine wiki. Now it works.

Log in to reply

Looks like your connection to Oxygine was lost, please wait while we try to reconnect.