سؤال

I just discovered that the new commandline in cocos2d-js (3.0alpha on OS X 10.9.2) is awsome. With two commands you can create a project and then deploy it on web, android, ios and mac. I tried web and android and it worked instantly.

Then I tried to run the sample game js-moonwarriors which comes together with the framework using

cocos run -p android

from within the project directory. But it stops with the error:

Can't find the projects directories in this project.

No idea. What is missing?

Update: cocos2d-js 3.0alpha2 is out and everything is working fine.

هل كانت مفيدة؟

المحلول

I got an answer to that from cocos2d-x forum:

Hi, this functionality is missing in 3.0 alpha, but tomorrow we will release 3.0 alpha2, and the issue have been solved, you can use cocos command to compile and run js-tests and moon warriors.

نصائح أخرى

Apparently alpha 2 has not been released yet, and I cloned their git branch and it's still not fixed. I suspect it's due to the lack of "framework" directory, so I tried:

ln -s ../../frameworks .
ln -s ~/prj/c2x/cocos2d-js/samples/js-tests/project frameworks/runtime-src

Unfortunately instead of showing samples, it simply shows Hello World. I even did

rgrep . 'Hello World'

And pretty sure the string is not there. Weird.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top