Developing with cocos2d-x for android on Linux

Developing with cocos2d-x for android on Linux
0.0 0



As part of my self teaching program I like to document my progress and failures as much as I can.

Among many other stuffs I’m learning cocos2d-x so I wrote a tutorial explaining how to set up cocos2d-x environment on Linux in order to develop for android and how to import it into Eclipse.

It’s based in my own experience and I hope it will be helpful to someone.

You can read it here:





Brilliant! I add the link into FAQ and wiki page.


I dissapointed that in linux port cocos2d-x depends on fmod, which free only for non-commercial.
And why in repo placed samples, ogg files from fmod distrib? Looks that repository transform into junkyard of many unnessesary files.

  1. Do you have better resolution than fmod? I think linux is just a develop platform, such as windows. fmod will not applied to your game on android
  2. You’re right, I will ask HuaXu Cai to consider about remove them


Now both windows and linux versions really only for developing, but i think that cocos2d-x already very good not for only mobile platforms :slight_smile: If in future powervr, fmod dependency would be removed then i believe we can make our community bigger and stronger.


Do you have any suggestion? What lib can be used?


Hey I’m having problems trying to apply your tutorial. I got to the point of building the hello world example, however I got this error:

mkdir: cannot create directory `/home/dany/local/sdk/cocos2d/HelloWorld/android/assets': No such file or directory ./ line 26: pushd: /home/dany/local/sdk/android-ndk: No such file or directory ./ line 27: ./ndk-build: No such file or directory ./ line 28: popd: directory stack empty

Can you help me please? Also a lot of the software you’re using is very old, weird for a 17 days old post. Well never mind I use latest JDK 7 installed via ubuntu sw center, latest android ndk and sdk according to your tutorial and latest cocos2d-x which also has little differences. So I’ve spent whole day installing Ubuntu and cocos2d-x and got here… not nice.

Also do you guys have an IRC or something?



You’ve posted the same question in the comments on my blog.

I’ve answered your question there but I will repeat it here:

It seems that the path


don’t exist.

To be sure, open command prompt and copy and paste the command bellow:

ls /home/dany/local/sdk/cocos2d/HelloWorld/android/assets

Please, carefully review each step. I wrote this tutorial during the process of building my environment and everything is working fine for me.

Moreover, you should be able to use new software versions if you adapt each step to reflect paths used as needed.





ye sorry for double post, it is very rare that someone answers on their blog and since the tutorial looked old I was afraid the blog is dead.

never the less, will try tommorow, thanks


No problem.

I hope my suggestion help you to solve the problem.

By the way, it was posted on September 16, 2011.





OK there is no folder like this there. I have even added the folder manually but no success. How do I check I have all the prerequisites installed right?


Remote assistance is hard because I cannot check each step by myself but I recommend you a fresh start.

I mean, you should install every thing again.

And take care to replace paths in tutorial with paths you’re using. I’m pretty sure you’re missing and / or messing some step.





I think both LibBASS (
and IrrKlang (

are free for non commercial and have very reasonable licensing terms.

James Mintram


Hi. Write your own player for all platforms with the OpenAL and OpenSL.