My game is crashing during the sdkbox::PluginChartboost::init(); in AppDelegate.cpp
My cocos2dxActivity.java
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
onLoadNativeLibraries();
SDKBox.init(this);
sContext = this;
this.mHandler = new Cocos2dxHandler(this);
Cocos2dxHelper.init(this);
this.mGLContextAttrs = getGLContextAttrs();
this.init();
if (mVideoHelper == null) {
mVideoHelper = new Cocos2dxVideoHelper(this, mFrameLayout);
}
if(mWebViewHelper == null){
mWebViewHelper = new Cocos2dxWebViewHelper(mFrameLayout);
}
}
@Override
protected void onStart() {
super.onStart();
SDKBox.onStart();
}
@Override
protected void onStop() {
super.onStop();
SDKBox.onStop();
}
@Override
protected void onResume() {
super.onResume();
SDKBox.onResume();
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
Cocos2dxHelper.onResume();
mGLSurfaceView.onResume();
}
else {
Cocos2dxHelper.onPause();
mGLSurfaceView.onPause();
}
}
@Override
protected void onPause() {
super.onPause();
SDKBox.onPause();
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
public void onBackPressed() {
if(!SDKBox.onBackPressed()) {
super.onBackPressed();
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
for (OnActivityResultListener listener : Cocos2dxHelper.getOnActivityResultListeners()) {
listener.onActivityResult(requestCode, resultCode, data);
}
if(!SDKBox.onActivityResult(requestCode, resultCode, data)) {
super.onActivityResult(requestCode, resultCode, data);
}
}
My sdkbox_config.json
{
"android": {
"Chartboost": {
"id": "qwertyuiop",
"signature": "qwertyuiopmorelong",
"ads": {
"Default": {
"type": "interstitial"
},
"MoreLifes": {
"type": "rewarded_video"
}
}
}
}
}
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/external)
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos)
$(call import-add-path,$(LOCAL_PATH)/../../rapidjson)
$(call import-add-path, $(LOCAL_PATH))
LOCAL_MODULE := cocos2dcpp_shared
LOCAL_MODULE_FILENAME := libcocos2dcpp
HELLOCPP_FILES := $(wildcard $(LOCAL_PATH)/hellocpp/*.cpp)
HELLOCPP_FILES := $(HELLOCPP_FILES:$(LOCAL_PATH)/%=%)
CLASSES_FILES := $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp)
CLASSES_FILES := $(CLASSES_FILES:$(LOCAL_PATH)/%=%)
LOCAL_SRC_FILES := $(HELLOCPP_FILES)
LOCAL_SRC_FILES += $(CLASSES_FILES)
LOCAL_LDLIBS := -landroid -llog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes $(LOCAL_PATH)/../../rapidjson
LOCAL_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_store_static PluginChartboost sdkbox
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_profile_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_highway_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,.)
$(call import-module, extensions/cocos2dx-store)
$(call import-module, extensions/cocos2dx-profile)
$(call import-module, extensions/cocos2dx-highway)
$(call import-module, ./sdkbox)
$(call import-module, ./pluginchartboost)
my adb logcat
08-10 18:53:57.200: D/cocos2d-x debug info(4637): create rendererRecreatedListener for GLProgramState
08-10 18:53:57.210: D/cocos2d-x debug info(4637): preinit sdkbox <-- CCLOG BEFORE
08-10 18:53:57.210: D/PluginFactory(4637): Java class name of plugin PluginChartboost is : com/sdkbox/plugin/PluginChartboost
08-10 18:53:57.210: I/SDKBox(4637): class name : ----com/sdkbox/plugin/PluginChartboost----
08-10 18:53:57.220: D/Chartboost(4637): Register Chartboost
08-10 18:53:57.220: E/sdkbox(4637): getFingerprintString(build): 0a0a000a0 0000
08-10 18:53:57.220: E/sdkbox(4637): getFingerprintString(androidid): d92ee83b4a0c5b24
08-10 18:53:57.220: E/WifiInfo(4637): Failed to get MAC address from /efs/wifi/.mac.info
08-10 18:53:57.220: E/sdkbox(4637): getFingerprintString(macaddress): null
08-10 18:53:57.230: A/libc(4637): Fatal signal 6 (SIGABRT) at 0x0000121d (code=-6), thread 4652 (Thread-3636)
AppDelegate.cpp
bool AppDelegate::applicationDidFinishLaunching() {
CCLOG("preinit sdkbox");
sdkbox::PluginChartboost::init();
CCLOG("postinit sdkbox");
manager=new Manager();
...
}
Help me pls!! I dont know what else to do