When using the Cocos2d-extension (e.g ScrollView, Button) on my project,
I found that it is okay to compile in Xcode but not in Android;
It said cannot found "cocos-ext.h"
The case is easy because Android.mk in the extension folder is configured wrong;
File location: cocos2d-x/extension/Android.mk
Orignal setting:
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \
$(LOCAL_PATH) \
$(LOCAL_PATH)/GUI/CCControlExtension \
$(LOCAL_PATH)/GUI/CCScrollView
Correct one should: $(LOCAL_PATH) is added
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \
$(LOCAL_PATH) \
$(LOCAL_PATH)/GUI/CCControlExtension \
$(LOCAL_PATH)/GUI/CCScrollView
No comments:
Post a Comment