If you created Cocos2d-js native project.(if you dont create yet .pleas follow this link) You can run on Android and OS devices or simulators. Running project so easy
- cd directory/to/projectName // its for compiling apps cocos compile -p ios|mac|android|web // its for running apps cocos run -p ios|mac|android -
if you get error like "Can't find iOS target" or "Can't find Mac target" .You can run with code shown below for iOS platform . For this example FirstCocosGame is project name. You must change with your own.
cocos run --platform ios -t FirstCocosGame-mobile
for Mac platform
cocos compile --platform mac -t FirstCocosGame-desktop