Cocos Creator SDKBox AdMob compiling Error (both Android + iOS)


#1

Hi,

I have created a game and have run into compiling errors on both platforms.

On iOS:

I run into the following errors:

/Documents/solitaire-cocos-creator/build/jsb-default/frameworks/runtime-src/proj.ios_mac/../../cocos2d-x/cocos/scripting/js-bindings/manual/js_manual_conversions.h:81:1: error: unknown type name 'jsval'
jsval opaque_to_jsval( JSContext *cx, void* opaque);
^
/Documents/solitaire-cocos-creator/build/jsb-default/frameworks/runtime-src/proj.ios_mac/../../cocos2d-x/cocos/scripting/js-bindings/manual/js_manual_conversions.h:82:1: error: unknown type name 'jsval'
jsval c_class_to_jsval( JSContext *cx, void* handle, JS::HandleObject object, JSClass *klass, const char* class_name);
^
/Users/ericwan/Documents/solitaire-cocos-creator/build/jsb-default/frameworks/runtime-src/proj.ios_mac/../../cocos2d-x/cocos/scripting/js-bindings/manual/js_manual_conversions.h:85:1: error: unknown type name 'jsval'
jsval charptr_to_jsval( JSContext *cx, const char *str);
^
/Documents/solitaire-cocos-creator/build/jsb-default/frameworks/runtime-src/proj.ios_mac/../../cocos2d-x/cocos/scripting/js-bindings/manual/js_manual_conversions.h:136:55: error: unknown type name 'jsval'
bool jsvals_variadic_to_ccvaluevector( JSContext *cx, jsval *vp, int argc, cocos2d::ValueVector* ret);
                                                      ^
/Documents/solitaire-cocos-creator/build/jsb-default/frameworks/runtime-src/proj.ios_mac/../../cocos2d-x/cocos/scripting/js-bindings/manual/js_manual_conversions.h:148:33: error: no matching function for call to 'JS_IsArrayObject'
    JSB_PRECONDITION3( jsobj && JS_IsArrayObject( cx, jsobj),  cx, false, "Object must be an array");

I am on MacOS Sierra 10.12.6, Cocos Creator 1.7, SDKBox Ads/AdMob/Chartboost/Google Play Services 2.3.17.3
XCode 7

On Android:

In file included from /Documents/solitaire-cocos-creator/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/jni/../../../Classes/PluginSdkboxAdsJS.cpp:1:0:
/Documents/solitaire-cocos-creator/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/jni/../../../Classes/PluginSdkboxAdsJS.hpp:4:19: fatal error: jsapi.h: No such file or directory
 #include "jsapi.h"

my versions:
NDK_TOOLCHAIN_VERSION=4.9
APP_PLATFORM=android-23
APP_ABI=armeabi
NDK_ALL_ABIS=armeabi
NDK_DEBUG=0
APP_PLATFORM=android-9

Any help is appreciated!


#2

yes.
plz use sdkbox import chartboost --staging. will be released soon.


#3

So it is a chartboost specific issue? or shall I do that for all plugins?


#4

ALL plugins . will be release on 12/07 or 08.


#5

Hi Jimmy,

I ran the commands you suggested and got a lot further in the compilation. However, I run into another error:

Undefined symbols for architecture i386:
  "___isOSVersionAtLeast", referenced from:
      sdkbox::AdMobWrapperEnabled::cache(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in PluginAdMob(AdMobWrapper-E90EA116FA88C67.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
	Ld /Documents/solitaire-cocos-creator-2/build/jsb-default/publish/ios/Solitaire-mobile.app/Solitaire-mobile normal i386

Please advise. Thanks!


#6

plz upgrade your xcode, admob needs iOS 11 base sdk.


#7

that works. thanks!