【问题标题】:Cosos2d-X Build Android X86 Errors?Cosos2d-X 构建 Android X86 错误?
【发布时间】:2017-06-30 11:20:33
【问题描述】:

当我运行命令时

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.**

【问题讨论】:

  • 您可以尝试从 proj.android 编译 .py 文件并确保删除 obj 文件夹
  • @AjayPandya 没用

标签: android c++ compilation cocos2d-x


【解决方案1】:

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

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

APP_DEPRECATED_HEADERS := true

更多详情:link

【讨论】:

  • 没有问题= android-23,是不是造成的? = android-15
  • 是的,现在它运行良好。但有必要纠正其他错误。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-08-05
  • 2012-08-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-13
  • 2014-05-08
相关资源
最近更新 更多