Failed To Compile with SDKBox AdMob Plugin

Failed To Compile with SDKBox AdMob Plugin
0.0 0

#1

Hello all,

I am planning to use Cocos Creator to make a simple game, and serve ads with the SDKBox AdMob plugin.

At first the game compiles fine, however after I import the SDKbox AdMob plugin compile fails with the following messages:

    jni/../../../Classes/PluginAdMobJSHelper.cpp:87:13: error: 'class AdMobCallbackJS' has no member named '_paramVal'
         cb->_paramVal[2] = DOUBLE_TO_JSVAL(amount);
             ^
jni/../../../Classes/PluginAdMobJSHelper.cpp:87:50: error: 'DOUBLE_TO_JSVAL' was not declared in this scope
         cb->_paramVal[2] = DOUBLE_TO_JSVAL(amount);
                                                  ^
jni/../../../Classes/PluginAdMobJSHelper.cpp: In member function 'void AdMobListenerJS::invokeJS(const char*, int*, int)':
jni/../../../Classes/PluginAdMobJSHelper.cpp:122:31: error: 'JSVAL_VOID' was not declared in this scope
             if(func_handle == JSVAL_VOID) {

jni/../../../Classes/PluginAdMobJSHelper.cpp:159:36: error: '_paramVal' was not declared in this scope
         l->invokeJS(_name.c_str(), _paramVal, _paramLen);
                                    ^
jni/../../../Classes/PluginAdMobJSHelper.cpp: At global scope:
jni/../../../Classes/PluginAdMobJSHelper.cpp:167:77: error: 'jsval' has not been declared
 bool js_PluginAdMobJS_PluginAdMob_setListener(JSContext *cx, uint32_t argc, jsval *vp)
                                                                             ^
jni/../../../Classes/PluginAdMobJSHelper.cpp: In function 'bool js_PluginAdMobJS_PluginAdMob_setListener(JSContext*, uint32_t, int*)':
jni/../../../Classes/PluginAdMobJSHelper.cpp:176:52: error: cannot convert 'int*' to 'JS::Value*' for argument '2' to 'JS::CallArgs JS::CallArgsFromVp(unsigned int, JS::Value*)'
     JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
                                                    ^
jni/../../../Classes/PluginAdMobJSHelper.cpp:194:97: error: 'JS_ReportError' was not declared in this scope
     JS_ReportError(cx, "js_PluginAdMobJS_PluginAdMob_setIAPListener : wrong number of arguments");
                                                                                                 ^
jni/../../../Classes/PluginAdMobJSHelper.cpp: In function 'void admob_set_constants(JSContext*, const RootedObject&, const string&, const std::map<std::basic_string<char>, int>&)':
jni/../../../Classes/PluginAdMobJSHelper.cpp:205:5: error: 'jsval' was not declared in this scope
     jsval val = sdkbox::std_map_string_int_to_jsval(cx, params);
     ^
jni/../../../Classes/PluginAdMobJSHelper.cpp:208:10: error: 'val' was not declared in this scope
     rv = val;
          ^
jni/../../../Classes/PluginAdMobJSHelper.cpp: In function 'void register_all_PluginAdMobJS_helper(JSContext*, JS::HandleObject)':
jni/../../../Classes/PluginAdMobJSHelper.cpp:230:128: error: invalid conversion from 'bool (*)(JSContext*, uint32_t, int*) {aka bool (*)(JSContext*, unsigned int, int*)}' to 'JSNative {aka bool (*)(JSContext*, unsigned int, JS::Value*)}' [-fpermissive]
 JS_DefineFunction(cx, pluginObj, "setListener", js_PluginAdMobJS_PluginAdMob_setListener, 1, JSPROP_READONLY | JSPROP_PERMANENT); \
                                                                                                                                ^
jni/../../../Classes/PluginAdMobJSHelper.cpp:239:5: note: in expansion of macro 'REGISTE_ADMOB_FUNCTIONS'
     REGISTE_ADMOB_FUNCTIONS

while this is not the full log it is pretty representative of the errors.

I am on Mac, CocosCreator1.6.0-beta.6.2, android-ndk-r14b, android-23, and I see similar compile errors too for iOS.

Any feedback is appreciated.


#2

this issue cause by SpiderMonkey 52 version.

will be fixed in 2.3.16 and release 08/11.


#3

sdkbox 2.3.16? can you provide a link please? thank you


#4

release today, plz wait. :wink:


#5

yep thank you!


#6

@yinjimmy

Hi Jimmy, I see that the plugin is being updated.
However, when I am using the GUI installer to update the plugin, it continues to use the old version, v2.3.15.2.

I also tried to do the same using the command line tool, when i run the import it is still trying to download 2.3.15.2.
I also tried to set up a new project and copy the scenes over, and it’s also stuck at v2.3.15.2.

Please advise how to properly update the sdkbox Admob plugin version.

thanks!


#7
sdkbox import admob -s download.sdkbox.com/installer/v1

sdkbox command tool will select the main data server for you.
The other servers are syncing.