My friend and I are building a mobile game app for Android and iOS using Cocos2d-js.
We’re glad to see the new Cocos Code IDE v2 is based on IntelliJ IDEA.
But we can’t find any documentation on how to properly set it up.
We would like to transfer our existing Cocos2d-js game, which we started building in Cocos Code IDE v1 (Eclipse), to the new Cocos Code IDE v2 (IntelliJ IDEA).
We are able to create a new Cocos2d-js project in the new IDEA IDE, and run it in the cocos simulator. But we don’t know how to set up the rest of the IDEA IDE to be able to build the app.
It would be nice to see someone explain how to properly set up the
new Cocos IDE?
Also, what would be the proper way to transfer the project from the
older Eclipse to the new IntelliJ IDEA IDE?
I have problems with IntelliJ too. In my case I can’t even launch the app. It would be great if you tell me what libraries I should import, what modules to create and etc. Thanks.
If you have IntelliJ with the Cocos2d plugin installed, you can create a new Cocos project. When you launch IntelliJ, do:
Create New Project -> Cocos, Cocos-JS -> Next -> Next -> give it a name, Finish. Then your project is created and properly set up. You can run it by right clicking on your project, Run, and your project launches in the Cocos Simulator.
Thanks SonarSystems, it’s really helpful! Can’t wait for more. Especially on how to build and package an Android apk, can’t figure that one out. It used to be in the Cocos Tools menu in the V1 IDE, but it doesn’t seem to be there in the V2 IDE Cocos Tools menu.
I second the comment from livelite, would appreciate advise/tutorial on how to actually build/package and then deploy android app using Cocos Code IDE v2/Cocos2d-JS on Windows 8.
At the moment with Cocos Code IDE v2/Cocos2d-JS I can successfully get the test app (the ‘hello world’ framework after starting a new project) working OK on Windows 8 desktop, via Explorer v11 browser (but not Chrome?) when uploaded files to remote server and on a Samsung Galaxy connected via USB.
However, when trying to use the Build->Make Project or Build-Compile menu items (which I assume is what is needed to actually get the app compiled for uploading to an android device) I get an error dialog stating “Cannot start compiler: the SDK is not specified for module xxxx, Specify the SDK at Project Structure dialog”.
In the Project Structure window, I have “1.8 (java version 1.8.0_45)” selected as the Project SDK default, but still get the error about cannot start compiler. Further, the Modules tab of the Project Structure window does not appear to have options for setting SDK for a module.