ndk sdk都有配置
我建的项目是lua项目
cocos版本是3.7版本的
framework 也是3.7的
不过我机子里有2.x版本的库,应该不会影响到
因为在eclipase下没有生成so文件,所以像在命令行下进行生成
jni里面配置文件没动过,我看过很多教程都需要改,我检查了下,不知道如何修改
能帮我看看问题出在哪里吗
huangjiandeMac-mini:proj.android joye$ cocos compile -p android -19
执行命令:compile
编译模式:debug
使用 Eclipse 工程:/Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android
未指定 Android 目标平台版本,自动查找一个可用版本…
正在执行:’/Users/joye/Documents/android-sdk-macosx/tools/android update project -t android-19 -p /Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android’
Updated project.properties
Updated local.properties
Updated file /Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android/proguard-project.txt
It seems that there are sub-projects. If you want to update them
please use the --subprojects parameter.
未指定 Android 目标平台版本,自动查找一个可用版本…
正在执行:’/Users/joye/Documents/android-sdk-macosx/tools/android update lib-project -p /Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android/…/…/…/…/…/…/libs/cocos2d-x-3.7/cocos/platform/android/java -t android-19’
Updated project.properties
Updated local.properties
Updated file /Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android/…/…/…/…/…/…/libs/cocos2d-x-3.7/cocos/platform/android/java/proguard-project.txt
正在执行 ndk-build…
NDK 编译模式:debug
NDK_TOOLCHAIN_VERSION: 4.8
正在执行:’/Users/joye/Documents/android-ndk-r9d/ndk-build -C /Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android -j4 NDK_MODULE_PATH=/Applications/Cocos/frameworks/cocos2d-x-3.7:/Applications/Cocos/frameworks/cocos2d-x-3.7/cocos/:/Applications/Cocos/frameworks/cocos2d-x-3.7/external:/Applications/Cocos/frameworks/cocos2d-x-3.7/cocos/scripting NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=1’
make: Entering directory /Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android' StaticLibrary : libcpufeatures.a Gdbserver : libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup SharedLibrary : libcocos2dlua.so /Applications/Cocos/frameworks/cocos2d-x-3.7/cocos//scripting/lua-bindings/proj.android/prebuilt-mk/../../../../../prebuilt/android/armeabi/libluacocos2dandroid.a(CCLuaJavaBridge.o):function LuaJavaBridge::callJavaStaticMethod(lua_State*): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' /Applications/Cocos/frameworks/cocos2d-x-3.7/cocos//editor-support/cocostudio/prebuilt-mk/../../../../prebuilt/android/armeabi/libcocostudio.a(CCActionNode.o):function std::vector<cocos2d::Vector<cocostudio::ActionFrame*>*, std::allocator<cocos2d::Vector<cocostudio::ActionFrame*>*> >::at(unsigned int): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' /Applications/Cocos/frameworks/cocos2d-x-3.7/cocos//editor-support/cocostudio/prebuilt-mk/../../../../prebuilt/android/armeabi/libcocostudio.a(CCArmature.o):function cocostudio::Armature::drawContour(): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' /Applications/Cocos/frameworks/cocos2d-x-3.7/cocos//editor-support/cocostudio/prebuilt-mk/../../../../prebuilt/android/armeabi/libcocostudio.a(CCArmature.o):function cocostudio::Armature::init(std::string const&): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' collect2: error: ld returned 1 exit status make: *** Error 1 make: Leaving directory
/Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android’
执行命令出错,返回值:2。
我的android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := cocos2dlua_shared
LOCAL_MODULE_FILENAME := libcocos2dlua
FILE_LIST := hellolua/main.cpp
FILE_LIST += (wildcard (LOCAL_PATH)/…/…/Classes/.cpp)
FILE_LIST += (wildcard (LOCAL_PATH)/…/…/Classes/ide-support/.cpp)
FILE_LIST += (wildcard (LOCAL_PATH)/…/…/Classes/ide-support/*.c)
LOCAL_SRC_FILES := (FILE_LIST:(LOCAL_PATH)/=)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/…/…/Classes
LOCAL_STATIC_LIBRARIES := cocos2d_lua_static
LOCAL_STATIC_LIBRARIES += cocos2d_simulator_static
include $(BUILD_SHARED_LIBRARY)
(call import-module,scripting/lua-bindings/proj.android/prebuilt-mk) (call import-module,tools/simulator/libsimulator/proj.android/prebuilt-mk)
库路径是:
/Users/joye/Documents/libs/cocos2d-x-3.7
项目路径是
/Users/joye/Documents/git/oneGame/oneGame/frameworks/runtime-src/proj.android