follow instructions and have ran publish.sh & gameDevGuide.sh
when compiling android under IDE, it gives the following errors.
is gameDevGuide.sh working on IDE?
run the same steps under cocos2d-x-3.2 seems to work.
Error running command, return code: 1
Android NDK: WARNING: APP_PLATFORM android-16 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
Android NDK: /Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/cocos/editor-support/spine/Android.mk: Cannot find module with tag ‘protocols/android’ in import path
jni/Android.mk:67: *** Android NDK: Aborting. . Stop.
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory /Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android' make: Leaving directory/Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android’
Running command: compile
Building mode: debug
building native
NDK build mode: release
The Selected NDK toolchain version was 4.8 !
running: ‘/Users/xxx/Dev/android-ndk-r9c/ndk-build -C /Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android -j7 NDK_MODULE_PATH=/Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android/…/…/js-bindings:/Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x:/Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/cocos:/Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/external’
@zax, It looks like you have not add publish directory into the ndk_module_path. The configuration of ndk_module_path is in frameworks/runtime-src/proj.android/build-cfg.json.
Thanks zhangbin for your help.
It does step me though the error (either add the publish directory into ndk_module_path or append the directory to the last line of the Android.mk where it define the protocols)
However that brings me new errors like this.
Looks like it has difficulty to understand the plugin code.
also just see another post about pluginX doesn’t work well with 3.0-rc1 (i am using that with ide), is that true?
[javac] /Users/xxx/Documents/cocos/CocosJSGame2/frameworks/runtime-src/proj.android/src/org/cocos2dx/javascript/AppActivity.java:37: package org.cocos2dx.plugin does not exist
[javac] import org.cocos2dx.plugin.PluginWrapper;
Tried js 3.0-rc2
create a new project in ide > follow how to use pluginx on android instruction > add publish directory into ndk_module_path.
got a new error now.
jni/…/…/Classes/AppDelegate.cpp:23:41: fatal error: jsb_cocos2dx_pluginx_auto.hpp: No such file or directory #include “jsb_cocos2dx_pluginx_auto.hpp”
^
just an update,
move all js-bindings/cocos2d-x/plugin/jsbindings/auto to js-bindings/bindings/auto
move all js-bindings/cocos2d-x/plugin/jsbindings/manual to js-bindings/bindings/manual
resolve the fatal error about jsb_cocos2dx_pluginx_auto.hpp: No such file or directory
but i am getting new errors about
jni/…/…/Classes/AppDelegate.cpp:124: error: undefined reference to ‘register_all_pluginx_protocols(JSContext*, JSObject*)’
jni/…/…/Classes/AppDelegate.cpp:124: error: undefined reference to ‘register_pluginx_js_extensions(JSContext*, JSObject*)’