[SOLVED] Chartboost android deploy error

[SOLVED] Chartboost android deploy error
0.0 0

#1

Hello,

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.


#2

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.


#3

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_C_INCLUDES := $(LOCAL_PATH)/../../Classes

# _COCOS_HEADER_ANDROID_BEGIN
# _COCOS_HEADER_ANDROID_END


LOCAL_STATIC_LIBRARIES := cocos2dx_static
LOCAL_STATIC_LIBRARIES += PluginChartboost
LOCAL_STATIC_LIBRARIES += sdkbox

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


# _COCOS_LIB_ANDROID_BEGIN
# _COCOS_LIB_ANDROID_END

include $(BUILD_SHARED_LIBRARY)

$(call import-module,.)

# _COCOS_LIB_IMPORT_ANDROID_BEGIN
# _COCOS_LIB_IMPORT_ANDROID_END

Also thanks for trying to help.


#4

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:

include $(BUILD_SHARED_LIBRARY)
$(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)
#5

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:


#6

@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.


#7

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).


#8

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


#9

I think NDK_MODULE_PATH was injected by cocos console


#10

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


#11

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