Cocos Code IDE 1.2.0 configuration error

Hi, I’m having strange problems after uninstalling Cocos Code IDE v1.1.0 and installing v1.2.0:

The IDE keeps saying that I need to configure my frameworks paths, and shows me this screen:

But then:

  • If I put my cocos2d-js folder path in “Framework” I don’t know what to put in “Simulator”. I’ve been using adt-bundle until v1.1.0 without problems, but this version of the IDE is asking for a “Simulator.apk” file, where can I find this??
  • If I select “Engine Mode” the bottom label says “please set Cocos2d-x or cocos2d-JS engine path”, but then the drop downs seem to be for “Lua” or “JavaScript”, and the “Lua” path is pointing to a location that doesn’t exist by default (the one in the screenshot). I can set the JavaScript path just fine, but if I leave the Lua path blank (having pressed “Restore Defaults”) I get an error that fades too quickly for me to read what it says when I press “OK”. Note that I don’t want to use Lua, just JavaScript.

There’s also a “Quick Setting” option, but nothing I put there seems to make the IDE happy, what is this for??

Any help? I wanted to use this weekend for building and testing a couple of projects, but now I’m stuck, I’ll have to go back to relying on the console I guess.

PS: what is the difference between “Framework Mode” and “Engine Mode”?

With cocos there now exists two versions of cocos2d-x.
There is the “normal” source version, which is called Engine Mode inside of cocos code ide.

Than there is the prebuilt version of cocos2d-x which is called Framework mode inside of cocos code ide.
With cocos framework you don’t need to build the sources which saves you a lot of time. You can only download cocos framework via cocos which you can download here http://cocos2d-x.org/download The cocos framework has his “own” simulator and the path for this simulator should be added here (only if you are using framework mode of course)

I think it’s easier for you to use EngineMode. There you need to set the path for JavaScript. If you set the JavaScript Path correctly, everything should work like it should. I think you can ignore all errors according to Lua because you aren’t using it.

BTW: You don’t need to reinstall cocos code ide when a new update is released. You can just update the cocos code ide.

I tried that, but if I click on the little world icon for debugging in browser I get no reaction from the IDE, not even console message or a pop-up warning. Plus I’d like to be able to build and test on android '^^

Thanks for the reply.

I am using lua but I need to right click the project, use cocos tools and update the project after I change the cocos2d-x version. You could try that?

I’m using Cocos Code IDE 1.20 for Mac with Cocos2d-JS v3.5, working fine.

Just download this Cocos2d-JS and unzip to a path you like
http://www.cocos2d-x.org/filedown/cocos2d-js-v3.5.zip

You need to upgrade cocos console with the setup.py in Cocos2d-JS v3.5 package:

$ cd cocos2d-js-v3.5
$ ./setup.py

http://www.cocos2d-x.org/docs/manual/framework/html5/release-notes/v3.5/upgrade-guide/en

Then in Cocos Code IDE -> Preference -> Cocos
Setup every path for python, NDK, SDK, ANT, JDK

In the framework
Choose Engine Mode -> Javascript -> custom -> select the cocos2d-js-v3.5 folder you unzip just now.

Click Apply and OK.

For more details, check this
http://www.cocos2d-x.org/wiki/How_to_Debug_Cocos2d-JS_Game_Using_Code_IDE

I tried that, but it fails with a pop-up saying “Framework mode does not suppor update” (regardless of me having set up Framework Mode or Engine Mode), so I created a new project with the console and copied the new framework files by hand.

I’ve now installed Cocos and set up the IDE in Framework mode like this:


(the Engine mode’s Lua path keeps autofilling like that)

Now at least I can run in web browser from within the IDE, but I have the following problems:

  • Trying to create a new project within the IDE gives this error in Cocos Console: Read json file null failed, the reason is:null (that said, creating a new project using cocos new in the Windows’ console works fine)
  • Building for windows works, but when I try to run I get the following:

    and if I click on “Play” I get this:

Are you missing some declaration in project.json jsList?

Or do you forget to link source of some share library?

That’s correct, you can’t update a project which was created in framework mode. You need to create a new project (with the new framework version) and copy your stuff into this project. At least I don’t know of another way to update a framework project.

Did you also run the setup.py inside of this folder?

Inside what folder? I only ran it in my E:\cocos2d-js, why would I need to run it in another folder? Wouldn’t that change what the cocos command does when used in the Windows console?

Not that I can think of. The game works just fine if I run it on browser, so that can’t be it, right?

I think you should change the debug target, use the 3rd button “Debug Configurations” after “Target” to change target platform.

Do you build new runtime with Cocos Code IDE?
If yes, may be you should try use the default runtime.

That’s correct, I just wanted to be sure that the setup.py of the cocos framework was run ^^

I’m not really sure what you are talking about.

But anyway, I think I know why everything’s failing:

I thought IDE 1.2.0 was able to work with cocos2d-js v3.5, so I updated my js to that version… But now I’m learning it can’t! So I’ll try to change back to v3.4 and see if that does the trick…

Thanks!

I’m using Cocos Code IDE 1.2.0 for Mac 64bit with Cocos2d-JS v3.5 in engine mode, everything working fine.

Then I’m lost, I’ll forget about using it for a while and do a clean install when I have the time.

Where do you get the normal source version? Off the website? I downloaded that (3.6) and tried to set Engine mode that way, but it kept giving me an error about not having PrebuiltRuntimeLua.apk

Hi,
Why do you choose Engine Mode over Framework Mode?

Thanks

I just follow the Cocos Code IDE tutorial when i learning how to use.
http://www.cocos2d-x.org/wiki/How_to_Debug_Cocos2d-JS_Game_Using_Code_IDE

So far no problem with the Engine Mode.

Unfortunately, i don’t know whats the difference between them.

1 Like

Nice, thanks a lot!
I’ll do exactly that too.

I am having a problem in setting up lua path in cocos code ide, it ask for PrebuiltRuntimeLua.apk…where can i find that?

You should build a new project using the Cocos Console (command line/terminal) instead of the IDE.
Cocos IDE is not supported anymore.