How to use plugin-x in cocos2d-x 3.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/publish.sh

  2. add this line to Android.mk 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 build_native.py to run android project. Can i do it? :slight_smile:

@vmgame
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.

@zhangbin
Thanks you :slight_smile:

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

@vmgame
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: https://github.com/cocos2d/cocos2d-x

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

@zhangbin


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 (https://developers.google.com/mobile-ads-sdk/docs/admob/smart-banners)

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.

@vmgame:
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.


http://stackoverflow.com/questions/16351639/admob-error-you-must-have-adactivity-declared-in-androidmanifest-xml-with-conf

@ttvu90
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:

@ttvu90
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: