0

TinyXML-1 can't open file. File exist on that path, but xmlDoc.ErrorDesc() writes Failed to open file. Can tinyXML1 open files on android or I must use Tinyxml2?

JustOneMan
  • 231
  • 1
  • 9
  • 34
  • bool StateParser::parseState(const char *stateFile, std::string stateID, std::vector *pObjects, std::vector *pTextureIDs) { // create the XML document TiXmlDocument xmlDoc; // load the state file if(!xmlDoc.LoadFile(stateFile)) { std::cerr << xmlDoc.ErrorDesc() << "\n"; return false; } – JustOneMan May 05 '14 at 16:34

1 Answers1

1

What is the exact error on your logcat?

It can be just that you didn't put the required permission:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

In your AndroidManifest.xml

Heisenberg
  • 656
  • 7
  • 10
  • Logcat doesn't show any errors. I have that permision in AnroidManifest.xml, but xmlDoc.LoadFile(File) returns NULL and file dosen't load. – JustOneMan May 05 '14 at 14:48
  • 1
    Put the code where you create the File variable (the one inside xmlDoc.Loadfile(>File<)). – Heisenberg May 05 '14 at 15:06