This question is regarding Project Architecture and workflow. I have an installation of cocos2d-x and Cocos Studio with Cocos Framework ( version 3.6). I carried out different build tests with hello world ( only 1 sprite in a scene) as follows:

  • Cocos Framework Android Build [ release ] : 9.2 mb
  • Cocos2d-x Android Build [ release ] : 2.06 mb
  • cocos Framework Game Source Directory : 379 MB
  • Cocosd2d-x Game Source Directory : 600+ Mb

After a debug version of windows build

  • Cocosd2d-x Game Source Directory : 4+ GB

I want to work with the cocos2d-x native workflow but its huge source is actually a problem for Github / bitbucket hostings and/or project migrations. So the questions are:

  1. Why is there a huge difference in the android builds by using pre-compiled header?
  2. How can I have Lowest Android builds with precompiled headers (cocos Studio / Framework )?

1 Answer 1


okay, its been a while since anyone answered the question and finally i figured it out myself.

  1. The pre-compiled headers does not require the user to build all the engine source code from scratch ( and this is the reason you see only one project in visual studio whereas when using source version, you see atleast projects in the solution explorer because they should be built too). Hence, they are already packed as dlls and does not occupy memory for db files and other build files. Hence the huge difference between their sizes.

    1. It turns out, the user should not be dependent on pre-compiled headers for production ready APKs. the workflow is actually quite simple : Make the whole game with pre-compiled headers ( this saves hell lot of time in development + builds). Once you are fully satisfied with the game and it is ready to be shipped / published, just create an new project with the source, copy the source files, update the make list, build. That's how the overall workflow should be maintained.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .