Cosos2d-X构建Android X86错误?

时间:2017-06-30 11:20:33

标签: android c++ compilation cocos2d-x

当我运行命令

cocos compile -p android --ap android-15 --app-abi x86

我收到错误

/audio/android/cutils/bitops.h: In function 'int bitmask_ffz(unsigned int*, int)':
/audio/android/cutils/bitops.h:65:30: error: 'ffs' was not declared in this scope

 bit = ffs(~bitmask[i]);
                          ^

[x86] Compile++      : audioengine_static <= AudioDecoderProvider.cpp

make: ** [obj/local/x86/objs-debug/audioengine_static/AudioDecoder.o] Error 1

make: ** Waiting for unfinished jobs....

make: Leaving directory `/DeneOyun/proj.android'

**Error running command, return code: 2.**

1 个答案:

答案 0 :(得分:0)

您可能已将NDK升级到15版。

将以下内容添加到Android.mk:

APP_DEPRECATED_HEADERS := true

了解更多详情:link