cocos 2.4,打包apk编译出错

编译模式:release
使用 Android Studio 工程:D:\cocosGame\hazinoad\build\jsb-link\frameworks\runtime-src\proj.android-studio
正在生成 apk 文件…
正在执行:’“D:\cocosGame\hazinoad\build\jsb-link\frameworks\runtime-src\proj.android-studio\gradlew.bat” --parallel --info assembleRelease’

Initialized native services in: C:\Users\Administrator.gradle\native

FAILURE: Build failed with an exception.

  • What went wrong:
    Unable to get mutable Windows environment variable map

  • 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
    执行命令出错,返回值:1。

这个要怎么解决,环境变量已配置image

会不会 d:\Program Files (x86)\java 路径下还有一层目录?比如 d:\Program Files (x86)\Java\jdk1.8.0_271

java就是根目录了,版本17.0.1


这边指定下 jdk 试试?