Is this wiki entry still relevant with Cocos2d-x v.3.2?
http://www.cocos2d-x.org/wiki/Plugin-X_Integration_Guide_for_Android
I’m having trouble once I reach the “Manual modified” section. Before I continue trying to make this work I’d like confirmation that the Plugin-X_Integration_Guide_for_Android is still relevant. I’m suspicious that it is no longer relevant because it suggests many configuration settings and code changes I don’t find implemented in the HelloPlugins project from GitHub (https://github.com/cocos2d-x/plugin-x/tree/develop/samples/HelloPlugins). Also, are the HelloPlugins samples current for 3.2?
Just a few of the problems I’ve found with the wiki entry:
-
Modify the ndk-build command parameter : add the publish directory into parameter NDK_MODULE_PATH , such as : NDK_MODULE_PATH=${PLUGIN_ROOT}/publish
— Is this change to be made in Android.mk? (i.e., … /Cocos2d-x/plugin/samples/HelloPlugins/proj.android/jni/Android.mk)
— This change is not seen in Android.mk of HelloPlugins
-
Add code into the method JNI_OnLoad, like this : …
— To which file is this change made? HelloWorldScene.cpp?
— Because it’s returning a jint I infer that JNI_OnLoad should be added to a JNI area of the code wrapped in an extern “C” { } block. Correct?
— #include “PluginJniHelper.h” must be the full path (and not curly quotes, but straight quotes): #include “platform/android/jni/JniHelper.h”
— Where is the const JNI_VERSION_1_4 defined?
— This change is not seen in HelloWorldScene.cpp of HelloPlugins nor in a couple of the Scenes (TestAnalyticsScene.cpp, TestAdsScene.cpp…)
-
Invoke method PluginWrapper.init() when the main activity of the game is created…
— I infer that this change is made in this file: … /Cocos2d-x/plugin/samples/HelloPlugins/proj.android/src/org/cocos2dx/HelloPlugins/AppActivity.java
— It seems like PluginManager is used in the HelloPlugins project instead of PluginWrapper.
At this point in my efforts there seems to be enough evidence that the wiki page on Project-X is outdated. Can anyone tell me where to find the best current sample project or tutorial for using Plugin-X for things like Google Ads, Analytics, IAP, etc.?
My system is properly configured to build Cocos2d-x projects (I can build a basic project and play it on my Android phone), however I’m unable to build the HelloPlugins project. I can post the errors I get if needed. I have even followed the steps in Plugin-X_Integration_Guide_for_Android up to the “Manual modified” section. I wonder if the HelloPlugins project may also be outdated and I’d like some input from the community.
BTW:
I cloned the wiki GitHub repository so I could make notes and update the errors I found: https://github.com/chukong/cocos-docs
According to this doc the protocol is to clone the wiki github repo, make changes, then submit a pull request:
http://www.cocos2d-x.org/docs/README
As near as I can determine, here is the github location of the doc I want to edit, however I only find the zh version not the en version:
https://github.com/chukong/cocos-docs/tree/master/manual/framework/native/wiki/plugin-x-integration-guide-for-android
Are the wiki docs on GitHub current? Where can I find the en version of the wiki entry for “plugin-x-integration-guide-for-android”?