title: Read Write file to android error with cocos2dx (v3.6)
body: <p>I'm trying to store game stage status into a file with Cocos2d-x (v3.6). But it works in iOS but not in Android. Here is the code i'm using. could anyone please tell me what's wrong i'm doing?</p>
  
  <p>I get the file path from FileUtils and then write and read "StageStat" object as binary. simple.</p>
  
  <pre><code>std::string path = FileUtils::getInstance()-&gt;getWritablePath();
  file = path + "stagestatus.txt";
  // write 
  FILE *fp = fopen(path.c_str(), "wb");
  for (int i = 0; i &lt; size; ++i) {
          fwrite(&amp;stages.at(i), sizeof(StageStat), 1, fp);
  }
  fclose(fp);
  // read
  FILE *fp = fopen(path.c_str(), "rb");
  for(int i = 0; i &lt; count; i++) {
          fread(&amp;ss, sizeof(StageStat), 1, fp);
          stages.push_back(ss);
  }
  fclose(fp)
  return stages;
  </code></pre>
  
  <p>I also tried <code>path = "/storage/emulated/0/Android/data/com.mygame.game/stat.txt"</code>  as hardcoded path</p>