Ceator打包Android问题

发帖前请先搜索是否有相关帖子: http://forum.cocos.com/search?q=category%3Acreator%20

反馈 Bug 时请提供

  • Creator 版本:1.7.0

  • 目标平台:Android
    我在Mac上构建、编译项目用 androidStudio打包出现问题
    ndk:16.1
    安卓sdk:用的是android-22的
    ant版本:ant-1.10-2.1

  • What went wrong:
    Execution failed for task ‘:hello_world:externalNativeBuildRelease’.

Build command failed.
Error while executing process /Users/chennes/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/chennes/CreatorProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/jni/Android.mk NDK_APPLICATION_MK=/Users/chennes/CreatorProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/jni/Application.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=0 APP_PLATFORM=android-14 NDK_OUT=/Users/chennes/CreatorProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=/Users/chennes/CreatorProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/lib NDK_TOOLCHAIN_VERSION=4.9 APP_PLATFORM=android-22 NDK_MODULE_PATH=/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x:/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos:/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/external -j8 NDK_DEBUG=0 /Users/chennes/CreatorProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi/libcocos2djs.so}
/Users/chennes/Library/Android/sdk/ndk-bundle/build/core/setup-app.mk:81: Android NDK: Application targets deprecated ABI(s): armeabi
/Users/chennes/Library/Android/sdk/ndk-bundle/build/core/setup-app.mk:82: Android NDK: Support for these ABIs will be removed in a future NDK release.
[armeabi] StaticLibrary : libcocos2d.a
[armeabi] Compile++ arm : cis <= b2ObjectDestroyNotifier.cpp
[armeabi] Compile++ arm : cocos2djs_shared <= main.cpp
[armeabi] Compile++ arm : cocos2djs_shared <= AppDelegate.cpp
[armeabi] Compile++ arm : cocos2djs_shared <= jsb_module_register.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= RefCounter.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= State.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= Value.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= HandleObject.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= MappingUtils.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= Class.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= ScriptEngine.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= Object.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= Utils.cpp
[armeabi] Compile++ arm : cocos2d_js_static <= Class.cpp
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp: In constructor ‘se::Value::Value()’:
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp:38:34: error: ‘memset’ was not declared in this scope
memset(&_u, 0, sizeof(_u));
^
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp: In constructor ‘se::Value::Value(se::Value::Type)’:
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp:45:34: error: ‘memset’ was not declared in this scope
memset(&_u, 0, sizeof(_u));
^
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp: In member function ‘se::Value& se::Value::operator=(const se::Value&)’:
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp:183:46: error: ‘memset’ was not declared in this scope
memset(&_u, 0, sizeof(_u));
^
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp: In member function ‘se::Value& se::Value::operator=(se::Value&&)’:
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp:217:46: error: ‘memset’ was not declared in this scope
memset(&_u, 0, sizeof(_u));
^
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp: In member function ‘void se::Value::reset(se::Value::Type)’:
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/Value.cpp:576:38: error: ‘memset’ was not declared in this scope
memset(&_u, 0, sizeof(_u));
^
[armeabi] Compile++ arm : cocos2d_js_static <= Object.cpp
make: *** [/Users/chennes/CreatorProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi/objs/cocos2d_js_static//jswrapper/Value.o] Error 1
make: *** Waiting for unfinished jobs…
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/v8/Object.cpp: In static member function ‘static se::Object* se::Object::createArrayBufferObject(void*, size_t)’:
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/v8/Object.cpp:207:61: error: ‘memcpy’ was not declared in this scope
memcpy(jsobj->GetContents().Data(), data, byteLength);
^
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/v8/Object.cpp: In static member function ‘static se::Object* se::Object::createUint8TypedArray(uint8_t*, size_t)’:
/Users/chennes/CreatorProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/…/jswrapper/v8/Object.cpp:215:61: error: ‘memcpy’ was not declared in this scope
memcpy(jsobj->GetContents().Data(), data, byteLength);
^
make: *** [/Users/chennes/CreatorProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi/objs/cocos2d_js_static/
/jswrapper/v8/Object.o] Error 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 30s
48 actionable tasks: 48 executed
Error running command, return code: 1.

这问题解决了没?

1赞