How to use plugin-x in cocos2d-x 3.0

How to use plugin-x in cocos2d-x 3.0
0.0 0


Hi every body,
I am a newbie, i want to use plugin-x but i cant include “PluginManager.h” file.
Please help me! Thanks

error.png (26.9 KB)


I’m using Plugin-x only for Android, so I can tell you the solution for Android.
sorry if it doesn’t help you.

  1. run cocos2d/plugin/tools/

  2. add this line to in your project

$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/plugin/publish)

then published plugins are now available in your project.

I think it’s not necessary to run publish.h If you’d like to refer an original PluginManager.h.
I haven’t tried yet, so I can not show you further instruction of this way.


Thanks for your quick help!
I’m using Plugin-x for android, but i wanna write source code by Visual studio and test progaram without plugin-x on win32. After i will run command to run android project. Can i do it? :slight_smile:


I’m sorry there isn’t any implementation of plugin-x on win32.
So, you can write your code in Visual Studio (Use Visual Studio as a code editor), but can’t compile your code in Visual Studio.


Thanks you :slight_smile:


@zhangbin What’s cocos2d-x version that plugin-x run fine :slight_smile:


I think plugin-x in all versions of cocos2d-x are running well. But only the version rc1 is not ok.
I have fixed the problem today. So you can take a try the plugin-x in our git repository:


@zhangbin: I’m still using the version rc0. It seems we don’t have SMART_BANNER for android now ?



Is it missing the build_native file?:;qst


What’s your mean of SMART_BANNER?
There is only one plugin for ads-- Admob. Maybe the version of Admob is out of date.


@zhangbin: SMART_BANNER will render screen-wide banner ads on any screen size (

I wrote a little code to allow me to use SMART_BANNER in plugin-x. Then I got the message “Not enough space to show ad!”.
Do you have any idea ?
Sorry, I’m new android.


you still use plugin-x in cocos2d-x 3.0, right ?

The follow links help me to use plugin-x. I hope it help you.


Thanks you, P/s: are you Vietnamese :slight_smile:
i have some error when run sample code (attachment file).


re “Not enough space to show ad!”, just use MATCH_PARENT instead of WRAP_CONTENT on AdsWrapper

mLayoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;

@vmgame: oh, sorry I can’t help. I’m new developer for android.

p/s: why do you think I’m vietnamese ? :slight_smile:


I think that because your nick name is ttvu90, look like Tran(Trinh) T Vu was born in 1990 :smiley:
My skype acc is chungdb.appnet. Nice to meet you :slight_smile: