Cocos2d console - compilation hangs

Hi,

I am creating a game using Cocos2d-X 3.10 with Windows 10 and Visual Studio 2015. Unfortunately, every time I try to compile my code for Android using: cocos compile -p android -m debug --ap android-19, at some point the compilation just stops and hangs. It doesn’t give me any error messages, it just stops and I am forced to try to compile again.

I have tried to disable my antivirus software (Webroot), but it didn’t made any difference.

Has anyone also had this problem? Is there a way around it?

what if you strip out the -m and --ap arguments?

if you run cocos new ... and try to compile that project, does it still hang?

Hi,

Yes, I did strip the -m and --ap options, but I got the same result. Plus I did try to compile a “cocos new…” project and the console stopped working on this command. I didn’t even got to the compile part.

However when I was doing that, I realised that I was using the “Windows Power Shell” to run all commands. So I switched to using the normal Windows Command Prompt (cmd) and the compilation went much further, but it still hanged at the end.

I am not sure why this is happening, but I seem to get better results using the CMD instead of the Power Shell.

Yeah, this is weird. I’d imagine if this was happening we would be getting a lot of complaints.

is your machine out of resources?

Hi,

Actually the cocos new command did work with the Windows CMD (sorry, I re-read my message and I think that it gave the impression that it didn’t work at all), but it still hanged on Windows Power Shell.

I’ve check the resource load and the compilation puts the CPU usage in a 100%. RAM and Disk usage increase and have an occasional spike to 100%, but otherwise they are ok. It is not like the computer itself stops working while compiling, so I don’t think it is the lack of resources.

so if you run cocos new ... and you can cocos compile ... that resulting project, BUT your project you can’t cocos compile, I would say something is happening in your project. Perhaps remove 3rd party libraries, etc to see what is causing it?

Actually the cocos compile also works for my own project. Although if I use the Power Shell I have to execute this command several times before the compilation finishes. As I said, for some reason the compilation just stops without producing any errors. The same happens when I compile a new project.

If I use the CMD instead of the Power Shell, it seems that things work better, but I still had to run the cocos compile twice to finish building my project.