I have a problem with the sample HelloCpp and i am desperate
My environment:
Mac OSX 10.8.2
cocos2d-2.1beta3-x-2.1.0
android-ndk-r8d-darwin-x86.tar.bz2
The proj.ios of the sample is running fine in the xcode emulator but i have problems get it running on my Android HTC One X.
I am able to build the apk file with the attached makefile and when i unzip it has the assets folder included and images in it (see attached screenshot), but after the installation of the apk file on the device the app tells me that it is not able to load the Sprites in assets/ipad (see attached screenshot).
I have removed everything from HelloWorldScene.cpp (see attached file) there is âalmostâ only the create call of the CCSprite class left.
I really hope someone can help me. Or has the same problem at least. End of wisdom.
Chris
I tried different versions of cocos2dx now.
Am I the only one who has problems get the sample HelloCcp running?
I started debugging the CCFileUtils.ccp in platform/android too.
s_strResourcePath
Is it correct to load a png file with pData = CCFileUtils::getFileDataFromZip(s_strResourcePath.c_str(), fullPath.c_str(), pSize); ?
Because thats the line where the program is running into.
the value of s_strResourcePath is /data/app/org.cocos2dx.hellocpp.apk and fullpath is assets/ipad/HelloWorld.png.
Thats an included sample, and no sourcecode written by me. Iâd like to start writing sourcecode with cocos2d-x, but it seems i have no luck.
I Have the same problem.then I use âandroid-ndk-r7-crystax-5.beta3â have the problem. It work well when I choose âandroid-ndk-r8bâ .I donât know why? Maybe there are bugs of NDK!
I have the same problem, I think it started after I switched to âandroid-ndk-r7-crystax-5.beta3â as well.
I have âandroid-ndk-r7bâ and will try it later today and confirmâŚ
I had this issue also, it was a tab bit confusing but basically i worked out that the application is unable to locate the image file, even though it was in the directory i had noticed that i had not added the new files to Xcode, once i added the new files to the project it worked fine.
Sorry for the bump but i noticed this was the first result in my google search for this issue.