Multiple android projects

Multiple android projects
0.0 0



I have a project with cocos2d-x for Android. I am working with Eclipse IDE. The peculiarity is that, as the game has a lot of resources and I don’t want that the final result take up much space, I have two versions of the project: one with HD graphics, and one with SD graphics (that are half the size of the others). The code is the same for the two versions, the only difference is the ‘Resources’ directory.

Right now what I do is to change the Resources directory every time I build the code. To do this I control the size of the sprites with:


But I don’t want to change the ‘Resources’ directory every time.

A solution could be to keep two independent projects, but then I would have the code duplicated and I think it is dangerous because maybe at some point the codes would be different.

But I would prefer if I can maintain the code only once, and be able to generate the two projects with different resources.

Is that even possible? Has anyone ever done something like this?

Thanks a lot in advance.


It is possible : On Mac (or Linux) just replace one of the “Classes” directory with a symlink to the other ( execute ln -s [source_path] [target_path] in shell ). I don’t know if it will work on Windows, but I also can’t see why not (of course you should just make a shotcut in Windows).

This way, you maintain one codebase shared among two projects and you can use different resources in both of them.