Help! CCFileUtils::getWriteablePath() always returns NULL string on android (not on iOS)

hello.

when I try to get writeable folder using CCFileUtils:getWriteablePath(), it always returns NULL string (“”).

It works corrent on iOS, but android, not works.

my cocos2d-x version is 2.0.4.

what’s problem? I spend three days to solve this problem, but failed.

please help me!

It seems that this issue has been fixed at the latest code on the github.
You should refer to this commit (https://github.com/cocos2d/cocos2d-x/commit/bd6aa9844551e3cc22a5c971864698671af00af9).

string CCFileUtils::getWriteablePath()
{
    // Fix for Nexus 10 (Android 4.2 multi-user environment)
    // the path is retrieved through Java Context.getCacheDir() method
    string dir("");
    const char *tmp = getCacheDirectoryJNI();

    if (tmp)
    {
        dir.append(tmp).append("/");

        return dir;
    }
    else
    {
        return "";
    }
}

Be carefull, the folder returned by getCacheDir() may be deleted at any time, I changed it to getFilesDir()