cocos2d-x-3.0

Linking errors when adding AdMob to IOS cocos2d-x 3.2

我们两清 提交于 2019-12-05 05:59:14
i trying to add AdMob to cocos2d-x 3.2 simple game using Xcode 5.1 iOS 7.1 i following the tutorials in https://developers.google.com/mobile-ads-sdk/docs/#ios and http://plaincode.blogspot.co.il/2014/02/example-of-admob-integration-in-cocos2d.html and after adding the -ObjC flag in the "Other Linker Flags" I'm getting linking errors: Undefined symbols for architecture armv7s: "_GCControllerDidDisconnectNotification", referenced from: -[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o) "_GCControllerDidConnectNotification", referenced

why “cocos compile -p android” gives “The android command is no longer available.” error

这一生的挚爱 提交于 2019-12-05 05:52:32
I am working on a cocos2d-x project. i always compile android project using cocos command cocos compile -p android --android-studio -m debug . But now this command returning an error. The android command is no longer available. For manual SDK and AVD management, please use Android Studio. For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager Error running command, return code: 1. Error running command, return code: 14. i can't figure out the problem. why this is giving error? what did i changed that caused this issue? I am working on Mac OS sierra, Cocos2d-x 3.14.1, Android

cocos2d-x android set up error - java.lang.NullPointerException

一笑奈何 提交于 2019-12-04 12:34:05
问题 I'm trying to set up cocos2d-x for android and I followed a video tutorial I passed the steps for terminal without any problem ( setup.py command result is as expected). My problem is after I set NDK_ROOT in C/C++ Build - environment section , I get some java.lang.NullPointerException exceptions. For example when I restart eclipse I get the following error. An internal error occurred during: "Android Library Update". java.lang.NullPointerException When I try to reopen C/C++ Build -

Can't get touch to work in multi-platform cocos2d-x app

时光总嘲笑我的痴心妄想 提交于 2019-12-04 09:25:17
问题 So I'm trying to create a simple app using cocos2d-x newest build and for some reason can't get my touch wired up. Here are my classes: class GameLayer : public cocos2d::Layer { public: static cocos2d::Layer* createLayer(); void update(float dt); virtual bool init(); CREATE_FUNC(GameLayer); private: bool onTouchBegan(cocos2d::Touch* touch, cocos2d::Event* event); void onTouchMoved(cocos2d::Touch* touch, cocos2d::Event* event); void onTouchEnded(cocos2d::Touch* touch, cocos2d::Event* event); }

cocos2d-X doesn't find android platform

送分小仙女□ 提交于 2019-12-04 08:40:39
问题 I'm using cocos2d-X v3 and I created a new cocos2d-X project following this tutorial. But when I run cocos run -s ~/MyCompany/MyGame -p android I get this error: building apk Android platform not specified, searching a default one... Can't find right android-platform for project : "/Users/filipeferminiano/MyCompany/MyGame/proj.android". The android-platform should be equal/larger than 10 回答1: These tutorials cover all steps: http://www.cocos2d-x.org/wiki/How_to_run_cpp-tests_on_Android and

How to enable Box2d debug draw with Coco2d-x 3.0 beta 2

╄→尐↘猪︶ㄣ 提交于 2019-12-04 06:02:18
问题 How I should enable debug draw with Cocos2d-x 3.0? There are some codes that do that with cocos2d-x 2.0 but they don't even compile on Cocos2d-x. Unfortunately I am new to both cocos2d-x and Box2d and I don't know how to port them. That would be great if you would share the method how you draw shapes. EDIT: I have found this: http://blog.csdn.net/tian2kong/article/details/20386213 I have overridden the draw method of my applications main Layer like this: void HelloWorld::draw() { GL:

cocos2d-x android set up error - java.lang.NullPointerException

℡╲_俬逩灬. 提交于 2019-12-03 08:19:23
I'm trying to set up cocos2d-x for android and I followed a video tutorial I passed the steps for terminal without any problem ( setup.py command result is as expected). My problem is after I set NDK_ROOT in C/C++ Build - environment section , I get some java.lang.NullPointerException exceptions. For example when I restart eclipse I get the following error. An internal error occurred during: "Android Library Update". java.lang.NullPointerException When I try to reopen C/C++ Build - environment section I get The currently displayed page contains invalid values. error and I can't edit the

Can't get touch to work in multi-platform cocos2d-x app

▼魔方 西西 提交于 2019-12-03 02:58:20
So I'm trying to create a simple app using cocos2d-x newest build and for some reason can't get my touch wired up. Here are my classes: class GameLayer : public cocos2d::Layer { public: static cocos2d::Layer* createLayer(); void update(float dt); virtual bool init(); CREATE_FUNC(GameLayer); private: bool onTouchBegan(cocos2d::Touch* touch, cocos2d::Event* event); void onTouchMoved(cocos2d::Touch* touch, cocos2d::Event* event); void onTouchEnded(cocos2d::Touch* touch, cocos2d::Event* event); }; cocos2d::Layer* GameLayer::createLayer() { GameLayer *layer = GameLayer::create(); return layer; }

cocos2d-X doesn't find android platform

て烟熏妆下的殇ゞ 提交于 2019-12-03 01:40:55
I'm using cocos2d-X v3 and I created a new cocos2d-X project following this tutorial . But when I run cocos run -s ~/MyCompany/MyGame -p android I get this error: building apk Android platform not specified, searching a default one... Can't find right android-platform for project : "/Users/filipeferminiano/MyCompany/MyGame/proj.android". The android-platform should be equal/larger than 10 These tutorials cover all steps: http://www.cocos2d-x.org/wiki/How_to_run_cpp-tests_on_Android and http://www.cocos2d-x.org/wiki/How_to_Build_an_Android_Project_with_Eclipse How to specify the android

How to enable Box2d debug draw with Coco2d-x 3.0 beta 2

纵饮孤独 提交于 2019-12-02 11:15:38
How I should enable debug draw with Cocos2d-x 3.0? There are some codes that do that with cocos2d-x 2.0 but they don't even compile on Cocos2d-x. Unfortunately I am new to both cocos2d-x and Box2d and I don't know how to port them. That would be great if you would share the method how you draw shapes. EDIT: I have found this: http://blog.csdn.net/tian2kong/article/details/20386213 I have overridden the draw method of my applications main Layer like this: void HelloWorld::draw() { GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POSITION); kmGLPushMatrix(); m_world->drawDebugData(); kmGLPopMatrix