Hello,
I have followed this Setup Native Development
I can build the code but could not compile them. It gives error :
Error: Compile failed. The log file path [ C:\Users\Admin\.CocosCreator\logs\native.log ]
at ChildProcess.<anonymous> (C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\app.asar\editor\core\native-utils.ccc:1:24494)
at ChildProcess.<anonymous> (C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\app.asar\editor\core\native-utils.ccc:1:6414)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.emit (domain.js:467:12)
at maybeClose (internal/child_process.js:1048:16)
at Process.onexit (internal/child_process.js:288:5)
at Process.callbackTrampoline (internal/async_hooks.js:131:14)
This is the log.
Starting process 'command 'C:\Users\Admin\AppData\Local\Android\Sdk\ndk\23.1.7779620\ndk-build.cmd''. Working directory: D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\instantapp Command: C:\Users\Admin\AppData\Local\Android\Sdk\ndk\23.1.7779620\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\instantapp\jni\Android.mk NDK_APPLICATION_MK=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\instantapp\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=D:/CCP/CCAnd/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\instantapp\build\intermediates\ndkBuild\debug\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x;C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x\cocos;C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x\external -j8 NDK_DEBUG=1 cocos2djs
Successfully started process 'command 'C:\Users\Admin\AppData\Local\Android\Sdk\ndk\23.1.7779620\ndk-build.cmd''
C:/CocosDashboard_1.0.20/resources/.editors/Creator/2.4.8/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: *** [C:/Users/Admin/AppData/Local/Android/Sdk/ndk/23.1.7779620/build//../build/core/build-binary.mk:478: D:/CCP/CCAnd/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/pvmp3dec/src/pvmp3_alias_reduction.o] Error 1
make: *** Waiting for unfinished jobs....
> Task :instantapp:externalNativeBuildDebug FAILED
:instantapp:externalNativeBuildDebug (Thread[Execution worker for ':' Thread 2,5,main]) completed. Took 18.259 secs.
:instantapp:processDebugManifestForPackage (Thread[Execution worker for ':' Thread 6,5,main]) completed. Took 23.612 secs.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':CocosCreatorAndroidBuild:externalNativeBuildDebug'.
> Build command failed.
Error while executing process C:\Users\Admin\AppData\Local\Android\Sdk\ndk\23.1.7779620\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=D:/CCP/CCAnd/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\debug\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x;C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x\cocos;C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x\external -j8 NDK_DEBUG=1 cocos2djs}
Android NDK: WARNING: Unsupported source file extensions in C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x/cocos/Android.mk for module cocos2dx_static
Android NDK: ../external/sources/edtaa3func/edtaa3func.h renderer/memop/RecyclePool.hpp
[x86] Compile++ : pvmp3dec <= pvmp3_alias_reduction.cpp
[x86] Compile++ : pvmp3dec <= pvmp3_get_main_data_size.cpp
[x86] Compile++ : pvmp3dec <= pvmp3_get_side_info.cpp
C:/CocosDashboard_1.0.20/resources/.editors/Creator/2.4.8/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: *** [C:/Users/Admin/AppData/Local/Android/Sdk/ndk/23.1.7779620/build//../build/core/build-binary.mk:478: D:/CCP/CCAnd/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/pvmp3dec/src/pvmp3_alias_reduction.o] Error 1
make: *** Waiting for unfinished jobs....
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':instantapp:externalNativeBuildDebug'.
> Build command failed.
Error while executing process C:\Users\Admin\AppData\Local\Android\Sdk\ndk\23.1.7779620\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\instantapp\jni\Android.mk NDK_APPLICATION_MK=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\instantapp\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=D:/CCP/CCAnd/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\CCP\CCAnd\jsb-link\frameworks\runtime-src\proj.android-studio\instantapp\build\intermediates\ndkBuild\debug\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x;C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x\cocos;C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x\external -j8 NDK_DEBUG=1 cocos2djs}
Android NDK: WARNING: Unsupported source file extensions in C:\CocosDashboard_1.0.20\resources\.editors\Creator\2.4.8\resources\cocos2d-x/cocos/Android.mk for module cocos2dx_static
Android NDK: ../external/sources/edtaa3func/edtaa3func.h renderer/memop/RecyclePool.hpp
[x86] Compile++ : pvmp3dec <= pvmp3_alias_reduction.cpp
[x86] Compile++ : pvmp3dec <= pvmp3_get_main_data_size.cpp
[x86] Compile++ : pvmp3dec <= pvmp3_get_side_info.cpp
C:/CocosDashboard_1.0.20/resources/.editors/Creator/2.4.8/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: *** [C:/Users/Admin/AppData/Local/Android/Sdk/ndk/23.1.7779620/build//../build/core/build-binary.mk:478: D:/CCP/CCAnd/jsb-link/frameworks/runtime-src/proj.android-studio/instantapp/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/pvmp3dec/src/pvmp3_alias_reduction.o] Error 1
make: *** Waiting for unfinished jobs....
* 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 27s49 actionable tasks: 24 executed, 25 up-to-date
Error running command, return code: 1.
native.zip (31.0 KB)
Android gradle plugin version : 4.2.2
Gradle version : 6.7.1
python version : 2.7.18
Android Studio Bumblebee | 2021.1.1 Patch 3 for Windows 64-bit.
Android API : 32
Android SDK Build tools : 33.0.0-rc2
NDK : 24.0.8215888