Created
July 22, 2014 02:58
-
-
Save midworld/2b2626ee8aff52bdccac to your computer and use it in GitHub Desktop.
cocos2d-x plugin-x android class path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** create the plugin by name */ | |
PluginProtocol* PluginFactory::createPlugin(const char* name) | |
{ | |
PluginProtocol* pRet = NULL; | |
do | |
{ | |
if (name == NULL || strlen(name) == 0) break; | |
std::string jClassName = ANDROID_PLUGIN_PACKAGE_PREFIX; | |
if (std::string(name).find("/") == std::string::npos) | |
jClassName.append(name); | |
else | |
jClassName = std::string(name); | |
PluginUtils::outputLog("PluginFactory", "Java class name of plugin %s is : %s", name, jClassName.c_str()); | |
PluginJniMethodInfo t; | |
if (! PluginJniHelper::getStaticMethodInfo(t | |
, "org/cocos2dx/plugin/PluginWrapper" | |
, "initPlugin" | |
, "(Ljava/lang/String;)Ljava/lang/Object;")) | |
{ | |
PluginUtils::outputLog("PluginFactory", "Can't find method initPlugin in class org.cocos2dx.plugin.PluginWrapper"); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment