[SOLVED] Chartboost android deploy error

[SOLVED] Chartboost android deploy error
0.0 0



I have problem when I’m trying to deploy my project for android. I added all files like documentation says, but when I’m trying to deploy I get this error:

"Unexpected close tag: MANIFEST, expecting Android NDK: Trying to define local module 'PluginChartboost' in jni/./pluginchartboost/Android.mk. Android NDK: But this module was already defined by jni/./pluginchartboost/Android.mk. make: Entering directory/Users/edvinas/Development/Cocos2d-x/Projects/MyProject/proj.android’
/Users/edvinas/Development/Cocos2d-x/Android/android-ndk-r10e/build/core/build-module.mk:34: *** Android NDK: Aborting. . Stop.
make: Leaving directory /Users/edvinas/Development/Cocos2d-x/Projects/MyProject/proj.android' Ndk build failed!

Also chartboost works perfectly on iOS.


Did you make any change to proj.android/jni/pluginchartboost/Android.mk? Normally it should be copied exactly from the download zip.

Also, could you double check the changes to proj.android/jni/Android.mk.

Glad to hear iOS works for you.


No I didn’t change anything in proj.android/jni/pluginchartboost/Android.mk. I just copied files where guide told. And my proj.android/jni/Android.mk looks like:

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)

LOCAL_MODULE := cocos2dcpp_shared

LOCAL_MODULE_FILENAME := libcocos2dcpp

LOCAL_SRC_FILES := hellocpp/main.cpp \
                   ../../Classes/AppDelegate.cpp \



LOCAL_STATIC_LIBRARIES := cocos2dx_static

$(call import-add-path,$(LOCAL_PATH))
$(call import-module, ./sdkbox)
$(call import-module, ./pluginchartboost)



$(call import-module,.)


Also thanks for trying to help.


You need to move the $(call import-module,.) in front of importing sdkbox and pluginchartboost. NDK is super sensitive… :unamused:

It should be something like this:

$(call import-module,.)
$(call import-module, ./sdkbox)
$(call import-module, ./pluginchartboost)

Btw, you should try sdkbox_installer. It will take care of all these.

Google Analytics Intergration Problems (module definetion error)

This sentence confused me: :pensive:

Note: It is important to make sure these statements are above the existing $(call import-module,./prebuilt-mk) statement.

Because there were no statement like $(call import-module,./prebuilt-mk) , so I thought it should be above $(call import-module,.)

BUT YOU ARE MY MAN. Thank you! :smile:


@Edvinas - thank you so much for the feedback. I have edited the documents to be clearer about this step. This will go out in the next update.


I had a very similar trouble with:

Android NDK: Trying to define local module ‘cocos2dcpp_shared’ in jni/./Android.mk.
Android NDK: But this module was already defined by jni/Android.mk.

I miraculously managed to fix it by removing the ‘proj.android/jni’ directory from NDK_MODULE_PATH variable in Eclipse (it’s still unclear to me which dirs should be included in this variable).


Can you tell me step by step how to do that, where NDK_MODULE_PATH variable is located in Eclipse?


I think NDK_MODULE_PATH was injected by cocos console


i have exactly the same problem, what should i do. need a detailed guide please.


Can you double check if there are circular includes in your Android.mk files?