plugin-x on 3.0beta2

Is plugin-x working for 3.0beta2?

I tried following the tutorial on wiki, everything compiles, but crash when I run on android…

This is my code, I put it on my MainMenu::init

// create menu, it's an autorelease object
	_listener = new MyAdsListener();
	_admob = dynamic_cast<ProtocolAds*>(PluginManager::getInstance()->loadPlugin("AdsAdmob"));
	TAdsDeveloperInfo devInfo;
	devInfo["AdmobID"] = ADMOB_ID_ANDROID;
	devInfo["FlurryAppKey"] = FLURRY_KEY_ANDROID;

	_admob->configDeveloperInfo(devInfo);
	_admob->setAdsListener(_listener);
	_admob->setDebugMode(true);

	Point posMid = Point(origin.x + visibleSize.width / 2, origin.y + visibleSize.height / 2);
	Menu* pMenu = Menu::create();
	pMenu->setPosition( Point::ZERO );

	LabelTTF* label1 = LabelTTF::create("ShowAds", "Arial", 24);
	MenuItemLabel* pItemShow = MenuItemLabel::create(label1, CC_CALLBACK_1(MainMenu::testShow, this));
	pItemShow->setAnchorPoint(Point(0.5f, 0));
	pMenu->addChild(pItemShow, 0);
	pItemShow->setPosition(posMid + Point(-100, -120));

	LabelTTF* label2 = LabelTTF::create("HideAds", "Arial", 24);
	MenuItemLabel* pItemHide = MenuItemLabel::create(label2, CC_CALLBACK_1(MainMenu::testHide, this));
	pItemHide->setAnchorPoint(Point(0.5f, 0));
	pMenu->addChild(pItemHide, 0);
	pItemHide->setPosition(posMid + Point(100, -120));

	_ads = _admob;
	_pos = ProtocolAds::kPosCenter;

	adInfo["AdmobType"] = "1";
	adInfo["AdmobSizeEnum"] = "1";
	adInfo["FlurryAdsID"] = "BANNER_MAIN_VC";
	adInfo["FlurryAdsSize"] = "2";

	this->addChild(pMenu, 1);

I got this error when running HelloPlugins

02-18 12:03:00.934: E/NativeActivity(27914): channel ‘417c9ab8 com.MyCompany.AwesomeGame/org.cocos2dx.cpp.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11
02-18 12:03:00.954: E/NativeActivity(27914): channel ‘417c9ab8 com.MyCompany.AwesomeGame/org.cocos2dx.cpp.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11
02-18 12:03:00.974: E/NativeActivity(27914): channel ‘417c9ab8 com.MyCompany.AwesomeGame/org.cocos2dx.cpp.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11
02-18 12:03:00.994: E/NativeActivity(27914): channel ‘417c9ab8 com.MyCompany.AwesomeGame/org.cocos2dx.cpp.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11
02-18 12:03:01.004: E/NativeActivity(27914): channel ‘417c9ab8 com.MyCompany.AwesomeGame/org.cocos2dx.cpp.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11
02-18 12:03:01.024: E/NativeActivity(27914): channel ‘417c9ab8 com.MyCompany.AwesomeGame/org.cocos2dx.cpp.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11
02-18 12:03:01.044: E/NativeActivity(27914): channel ‘417c9ab8 com.MyCompany.AwesomeGame/org.cocos2dx.cpp.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11
02-18 12:03:01.054: D/PluginFactory(27914): Java class name of plugin AdsAdmob is : org/cocos2dx/plugin/AdsAdmob
02-18 12:03:01.054: D/PluginJniHelper(27914): JavaVM is NULL
02-18 12:03:01.054: D/PluginJniHelper(27914): Failed to get JNIEnv
02-18 12:03:01.054: D/PluginFactory(27914): Can’t find method initPlugin in class org.cocos2dx.plugin.PluginWrapper
02-18 12:03:01.054: D/PluginFactory(27914): Java class name of plugin AdsFlurry is : org/cocos2dx/plugin/AdsFlurry
02-18 12:03:01.054: D/PluginJniHelper(27914): JavaVM is NULL
02-18 12:03:01.054: D/PluginJniHelper(27914): Failed to get JNIEnv
02-18 12:03:01.054: D/PluginFactory(27914): Can’t find method initPlugin in class org.cocos2dx.plugin.PluginWrapper
02-18 12:03:01.054: A/libc(27914): Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1)

is there something i’m missing?

I did it by duplicate the helloplugins project folder ,then copy classes and resources files to this project from my own project .

your error occurred on my project when i attempt to add plugin to my own project. now I see it is because the cpp file in jni folder musted be changed according to helloplugins project. also the published plugin jars must be referred or be copied to the lib folder of android project.

okay, I got admob from plugin-x to show some ads, but still there is some error keep logging when it’s still running

OpenGL error 0x0501 in \proj.android…/cocos2d/cocos/2d/CCTextureAtlas.cpp drawNumberOfQuads 701
E/Adreno200-ES20(11079): <qgl2DrvAPI_glDrawElementsInstancedXXX:689>: GL_INVALID_VALUE
E/dalvikvm(11079): JNI ERROR: env->self != thread-self (0x12f0f60 vs. 0x1342050); auto-correcting

cocos2d-x3.0rc0 + android i9000:

03-30 00:37:47.164: E/NativeActivity(7435): channel ‘409b3b80 ****.Cocos2dxActivity (client)’ ~ Failed to receive dispatch signal. status=-11

how to fix it ?
thank you

I also got this program,have you figure it

@jintao
I’m sorry for the inconvenience. As I know the sample project in plugin-x is not work in version rc1. I will fix it as soon as possible.

@kyo9999
I’m not sure the sample project in plugin-x is working or not in version rc0. But I will check it. Thanks for your feedback.