cocoscreator 2.4.x 打包android工程编译错误

fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
/Applications/CocosCreator/Creator/2.4.7/CocosCreator.app/Contents/Resources/cocos2d-x/external/sources/pvmp3dec/src/pvmp3_alias_reduction.cpp:172:70: error: implicit conversion from ‘int’ to ‘float’ changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-const-int-float-conversion]
*used_freq_lines = fxp_mul32_Q32(*used_freq_lines << 16, (int32)(0x7FFFFFFF / (float)18 - 1.0f)) >> 15;
^~~~~~~~~~ ~
1 error generated.
make: *** [/Users/Shell/Library/Android/sdk/ndk-bundle/build/core/build-binary.mk:478: /Users/Shell/WorkSpace/android_distribute/dressup_group/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/pvmp3dec/src/pvmp3_alias_reduction.o] Error 1
make: *** Waiting for unfinished jobs…
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor
fcntl(): Bad file descriptor

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

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

BUILD FAILED in 11m 15s
58 actionable tasks: 58 executed

试过了多个版本的cocoscreator 打包android工程,编译都会出现上面的问题

下一个 21.4.7075529 版本试试
试一试 配置NDK路径/Users/xx/Library/Android/sdk/ndk-bundle 改成 /Users/xx/Library/Android/sdk/ndk/21.4.7075529