DETAILED explanation. You need to put the image file that you want to use in the Resources folder of the Cocos2DX project that you are using. Then you need to run. / build _native.sh from Cygwin.
EXAMPLE: You create a game called cppgame. You create a cppgame project with the Create-android-project.bat file in the Cocos2DX folder. Now you have the cppgame project folder on c: c: / cocos2dx / cppgame /. In this folder, you have the "Resource" folder, which was also created (c: / cocos2dx / cppgame / Resources /).
- Place all the image files (sprite.png, * .png) that you want to use in the Resources folder.
- Open Cygwin as an administrator and navigate to c: /cocos2dx/cppgame/proj.android/.
- Enter "./build_native.sh" at the Cgywin prompt ("$").
This should put all your image files in the folder with the resources of your project, and now you can use them to create sprites!
EXPLANATION: the build_native.sh file copies image files to the resource folder and sets special permission so that they are not deleted when the program starts. If someone with a better understanding of cygwin coding can explain this better, I would be grateful.
source share