求助,cocos2dx 3.17.2 Release模式编译Android失败

报错如下:

Task :MathsBattle:generateJsonModelRelease FAILED
Task ‘:MathsBattle:generateJsonModelRelease’ is not up-to-date because:
No history is available.
External native generate JSON release: starting JSON generation
External native generate JSON release: using platform version 16 for ABI ARMEABI_V7A and min SDK version 16
External native generate JSON release: rebuilding JSON D:\MathsBattle\proj.android\app.externalNativeBuild\cmake\release\armeabi-v7a\android_gradle_build.json due to:
External native generate JSON release: - expected json D:\MathsBattle\proj.android\app.externalNativeBuild\cmake\release\armeabi-v7a\android_gradle_build.json file is not present, will remove stale json folder
External native generate JSON release: - missing previous command file D:\MathsBattle\proj.android\app.externalNativeBuild\cmake\release\armeabi-v7a\cmake_build_command.txt, will remove stale json folder
External native generate JSON release: removing stale contents from ‘D:\MathsBattle\proj.android\app.externalNativeBuild\cmake\release\armeabi-v7a’
External native generate JSON release: created folder ‘D:\MathsBattle\proj.android\app.externalNativeBuild\cmake\release\armeabi-v7a’
External native generate JSON release: executing cmake Executable : D:\COCOS2DX\android-sdk_r24.4.1-windows\android-sdk-windows\cmake\3.30.5\bin\cmake.exe
arguments :
-HD:\MathsBattle
-BD:\MathsBattle\proj.android\app.externalNativeBuild\cmake\release\armeabi-v7a
-DANDROID_ABI=armeabi-v7a
-DANDROID_PLATFORM=android-16
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\MathsBattle\proj.android\app\build\intermediates\cmake\release\obj\armeabi-v7a
-DCMAKE_BUILD_TYPE=Release
-DANDROID_NDK=D:\COCOS2DX\android-ndk-r26b-windows\android-ndk-r26b
-DCMAKE_CXX_FLAGS=-frtti -fexceptions -fsigned-char
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a
-DCMAKE_SYSTEM_VERSION=16
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_ANDROID_NDK=D:\COCOS2DX\android-ndk-r26b-windows\android-ndk-r26b
-DCMAKE_TOOLCHAIN_FILE=D:\COCOS2DX\android-ndk-r26b-windows\android-ndk-r26b\build\cmake\android.toolchain.cmake
-G Ninja
-DCMAKE_FIND_ROOT_PATH=
-DANDROID_STL=c++_static
-DANDROID_TOOLCHAIN=clang
-DANDROID_ARM_NEON=TRUE
jvmArgs :

null

:MathsBattle:generateJsonModelRelease (Thread[Task worker for ‘:’ Thread 14,5,main]) completed. Took 0.456 secs.

Task :libcocos2dx:compileReleaseJavaWithJavac
file or directory ‘D:\MathsBattle\cocos2d\cocos\platform\android\libcocos2dx\src\main\java’, not found
file or directory ‘D:\MathsBattle\cocos2d\cocos\platform\android\libcocos2dx\src\main\java’, not found
file or directory ‘D:\MathsBattle\cocos2d\cocos\platform\android\libcocos2dx\src\release\java’, not found
Task ‘:libcocos2dx:compileReleaseJavaWithJavac’ is not up-to-date because:
No history is available.
All input files are considered out-of-date for incremental task ‘:libcocos2dx:compileReleaseJavaWithJavac’.
Compiling with source level 1.7 and target level 1.7.
:libcocos2dx:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
file or directory ‘D:\MathsBattle\cocos2d\cocos\platform\android\libcocos2dx\src\main\java’, not found
file or directory ‘D:\MathsBattle\cocos2d\cocos\platform\android\libcocos2dx\src\release\java’, not found
Compiling with JDK Java compiler API.
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: 某些输入文件使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
Class dependency analysis for incremental compilation took 0.059 secs.
Created jar classpath snapshot for incremental compilation in 0.01 secs.
Written jar classpath snapshot for incremental compilation in 0.0 secs.

:libcocos2dx:compileReleaseJavaWithJavac (Thread[Task worker for ‘:’,5,main]) completed. Took 0.999 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:MathsBattle:generateJsonModelRelease’.

java.lang.NullPointerException (no error message)

  • 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 4s
29 actionable tasks: 26 executed, 3 up-to-date
VCS Checkout Cache (D:\MathsBattle\proj.android.gradle\vcsWorkingDirs) has not been cleaned up in 0 days
执行命令出错,返回值:1。