[SDKBOX 1.4.0.9] Error on undefined sdkbox getJNIMethodInfo

Hello,

I used SDKBOX for facebook, chartboost & google analytics on 1.4.0.9
However , i got error as below.

Does any one has experience on this problem ? Could you please help me to fix it ?

Thanks and best regards.

[armeabi-v7a] SharedLibrary : libcocos2dcpp.so
…/…/core/include/bridge.h:653: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(char const*, char const*, char const*)’
…/…/core/include/bridge.h:600: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*)’
…/…/core/include/bridge.h:600: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*)’
…/…/core/include/bridge.h:600: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*)’
…/…/core/include/bridge.h:600: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*)’
…/…/core/include/bridge.h:316: error: undefined reference to ‘sdkbox::JNIUtils::NewArray(std::vector<std::string, std::allocatorstd::string > const&)’
…/…/core/include/bridge.h:316: error: undefined reference to ‘sdkbox::JNIUtils::NewArray(std::vector<std::string, std::allocatorstd::string > const&)’
…/…/core/include/bridge.h:294: error: undefined reference to ‘sdkbox::JNIUtils::NewMap(std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > >)’
jni/src/FacebookWrapper-android.cpp:40: error: undefined reference to ‘sdkbox::PluginFactory::getInstance()’
jni/src/FacebookWrapper-android.cpp:40: error: undefined reference to ‘sdkbox::PluginFactory::create(std::string const&)’
jni/src/FacebookWrapper-android.cpp:41: error: undefined reference to ‘sdkbox::PluginUtils::getPluginJavaData(sdkbox::PluginProtocol*)’
jni/src/GoogleAnalyticsWrapper-android.cpp:31: error: undefined reference to ‘sdkbox::PluginFactory::getInstance()’
jni/src/GoogleAnalyticsWrapper-android.cpp:31: error: undefined reference to ‘sdkbox::PluginFactory::create(std::string const&)’
jni/src/GoogleAnalyticsWrapper-android.cpp:32: error: undefined reference to ‘sdkbox::PluginUtils::getPluginJavaData(sdkbox::PluginProtocol*)’
jni/src/ChartboostProxy.cpp:110: error: undefined reference to ‘sdkbox::PluginJniHelper::jstring2string(_jstring*)’
jni/src/ChartboostProxy.cpp:119: error: undefined reference to ‘sdkbox::PluginJniHelper::jstring2string(_jstring*)’
jni/src/ChartboostProxy.cpp:128: error: undefined reference to ‘sdkbox::PluginJniHelper::jstring2string(_jstring*)’
jni/src/ChartboostProxy.cpp:136: error: undefined reference to ‘sdkbox::PluginJniHelper::jstring2string(_jstring*)’
jni/src/ChartboostWrapper-android.cpp:50: error: undefined reference to ‘sdkbox::PluginFactory::getInstance()’
jni/src/ChartboostWrapper-android.cpp:50: error: undefined reference to ‘sdkbox::PluginFactory::create(std::string const&)’
jni/src/ChartboostWrapper-android.cpp:56: error: undefined reference to ‘sdkbox::PluginUtils::getPluginJavaData(sdkbox::PluginProtocol*)’
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libcocos2dcpp.so] Error 1
make: *** Waiting for unfinished jobs…
…/…/core/include/bridge.h:653: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(char const*, char const*, char const*)’
…/…/core/include/bridge.h:600: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*)’
…/…/core/include/bridge.h:600: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*)’
…/…/core/include/bridge.h:600: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*)’
…/…/core/include/bridge.h:600: error: undefined reference to ‘sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*)’
…/…/core/include/bridge.h:316: error: undefined reference to ‘sdkbox::JNIUtils::NewArray(std::vector<std::string, std::allocatorstd::string > const&)’
…/…/core/include/bridge.h:316: error: undefined reference to ‘sdkbox::JNIUtils::NewArray(std::vector<std::string, std::allocatorstd::string > const&)’
…/…/core/include/bridge.h:294: error: undefined reference to ‘sdkbox::JNIUtils::NewMap(std::map<std::string, std::string, std::lessstd::string, std::allocator<std::pair<std::string const, std::string> > >)’
jni/src/FacebookWrapper-android.cpp:40: error: undefined reference to ‘sdkbox::PluginFactory::getInstance()’
jni/src/FacebookWrapper-android.cpp:40: error: undefined reference to ‘sdkbox::PluginFactory::create(std::string const&)’
jni/src/FacebookWrapper-android.cpp:41: error: undefined reference to ‘sdkbox::PluginUtils::getPluginJavaData(sdkbox::PluginProtocol*)’
jni/src/GoogleAnalyticsWrapper-android.cpp:31: error: undefined reference to ‘sdkbox::PluginFactory::getInstance()’
jni/src/GoogleAnalyticsWrapper-android.cpp:31: error: undefined reference to ‘sdkbox::PluginFactory::create(std::string const&)’
jni/src/GoogleAnalyticsWrapper-android.cpp:32: error: undefined reference to ‘sdkbox::PluginUtils::getPluginJavaData(sdkbox::PluginProtocol*)’
jni/src/ChartboostProxy.cpp:110: error: undefined reference to ‘sdkbox::PluginJniHelper::jstring2string(_jstring*)’
jni/src/ChartboostProxy.cpp:119: error: undefined reference to ‘sdkbox::PluginJniHelper::jstring2string(_jstring*)’
jni/src/ChartboostProxy.cpp:128: error: undefined reference to ‘sdkbox::PluginJniHelper::jstring2string(_jstring*)’
jni/src/ChartboostProxy.cpp:136: error: undefined reference to ‘sdkbox::PluginJniHelper::jstring2string(_jstring*)’
jni/src/ChartboostWrapper-android.cpp:50: error: undefined reference to ‘sdkbox::PluginFactory::getInstance()’
jni/src/ChartboostWrapper-android.cpp:50: error: undefined reference to ‘sdkbox::PluginFactory::create(std::string const&)’
jni/src/ChartboostWrapper-android.cpp:56: error: undefined reference to ‘sdkbox::PluginUtils::getPluginJavaData(sdkbox::PluginProtocol*)’
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1
make: Leaving directory `/media/zing/developer/cocos2dx/FishHunting/proj.android-studio/app’
Error running command, return code: 2.

I have the same problem. did you find any solutions?

this is what worked for me: after updating sdkbox and all plugins to the latest version(1.4.0.9) I have deleted plugins files from proj.android/jni and reimported plugins.
After this the app compiled ok.

1 Like

Thank you so much for your suggestion,

I’m try with force downloading on staging & production ,but it didn’t work.
Maybe i need to remove all plugin from proj.android-studio/app/jni and reimport again.

I had this problem and it was fixed running an “sdkbox update”

Hi Thanks,

Upgrade with new version work for me.

Hello guys,

If you find similar log where it says about undefined reference that means there are some new source files in the plugin that you are importing but it is not defined at your side of old code.

Please run this command to get the latest version to solve your issues.

sdkbox update

Best,
Pabitra