안녕하세요~ 개발자 여러분.
cocos2d-x 참 어렵네요 하하

제가 xcode 리소스 아래 1_1.txt 파일을 넣고 아이폰에서는 어찌 불러와서 뿌려보는데

안드로이드에서 불러 오는게 쉽지 않네요

물론 xcode4라서 혼합 프로젝트에 리소스 내에도 파일을 복사해서 asset에 뜨게 했습니다.

string처리도  cpp에서 좀 이상한 것 같고 ㅠ


    const char *path;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)   
    path = CCFileUtils::fullPathFromRelativePath("1_1.txt"); //(path를 string으로 하니까 에러 나서 일단 const char로..)
#endif   

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) 
    path = CCFileUtils::fullPathFromRelativePath("/data/data/com.yourcompany.test1/1_1.txt");
//     path = CCFileUtils::fullPathFromRelativePath("1_1.txt");
#endif
   
    pFile = fopen (path,"r");
    CCLog("%s",path);


위처럼해서 안드로이드 기계에서 실행하면 뻗어요


cocos2d-x 사이트에 fileoperation이라던지 안드로이드펍 내부에 예제 찾아봐도 깔끔히 해결이 안되네요..

참 그리고 cocos2d-x에서 이클립스로  logcat 뿌릴라면 어찌 하죠? 하하

좋은 하루 되세요