在android上发布的cocos2dx-store路径

时间:2015-05-01 09:58:44

标签: android c++ android-ndk cocos2d-x-3.0

这是我的代码,我尝试了不同版本的cocos2d-x和最新的cocos2d-x-store,该程序在ios设备上运行良好。问题是,当我尝试顺应android平台时,它会显示

Android NDK: WARNING: APP_PLATFORM android-21 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    
make: Entering directory `/Users/Daniel/Desktop/Mojiang/proj.android'
[armeabi] Compile++ thumb: cocos2dcpp_shared <= main.cpp
[armeabi] Compile++ thumb: cocos2dcpp_shared <= AppDelegate.cpp
[armeabi] Compile++ thumb: cocos2dcpp_shared <= MainScene.cpp
[armeabi] Compile++ thumb: cocostudio_static <= CCActionFrame.cpp
In file included from /Users/Daniel/Desktop/Mojiang/proj.android/../cocos2d/cocos/editor-support/cocostudio/CCActionFrame.cpp:25:0:
/Users/Daniel/Desktop/Mojiang/proj.android/../cocos2d/cocos/editor-support/cocostudio/../cocostudio/CCActionFrame.h:28:29: fatal error: math/CCGeometry.h: No such file or directory
 #include "math/CCGeometry.h"
                             ^
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/cocostudio_static/CCActionFrame.o] Error 1
make: *** Waiting for unfinished jobs....


more info with my Android.mk file, which located in my jni file:

    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 \
                   ../../Classes/MainScene.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes


LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos2dx_store_static
LOCAL_WHOLE_STATIC_LIBRARIES += jansson_static


include $(BUILD_SHARED_LIBRARY)

$(call import-module,.)
$(call import-module,external/jansson)
$(call import-module,extensions)
$(call import-module,extensions/cocos2dx-store)

1 个答案:

答案 0 :(得分:0)

添加LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static$(call import-module,editor-support/cocostudio) 进入Android.mk