Android app crash, Windows works well

Android app crash, Windows works well
0.0 0


Hi, i’ve tryed to convert my cocos2dx app from windows to Android. After 4 hours to fix the build_native procedure (the android dir with wrong rights, the touch screen bug of the 11 version, the problem of the emulator under Windows 7…ecc ecc) i’ve the app into my Galaxy GS2. The problem is that doesn’t work…
My app have a tmx map (works) and an animated sprite. When i call in the main
mainSprite = new GameCharacterBase();
The game crash.
GameCharacterBase inherits from GameObject and GameObject from CCSprite. No new costructors, just a plain CCSprite costructor.
Under Windows is all fine, but under android i’m unable to run my app.
Any idea?

I’ll add the full project:


Ok, i’ve found where is the problem.
I use the xmlReadFile and works well under windows. Under Android i’m unable to load the file:

string plistPath(“Plists/test.plist”);
xmlDoc *doc = NULL;
doc = xmlReadFile(CCFileUtils::fullPathFromRelativePath(plistPath.c_str()), NULL, 0);

The code above is unable to load the plist file (xml). Probably is a path error…however any idea?


“Fixed”, i’ve deleted all the xml2 stuff and used the CCFileUtils::dictionaryWithContentsOfFile
Now works :stuck_out_tongue: