CocosCreator Andorid打包找不到JAVA_HOME-阿里云开发者社区

开发者社区> 开发与运维> 正文

CocosCreator Andorid打包找不到JAVA_HOME

简介: 版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/inforstack/article/details/78943187

Build Failed: Error: Please make sure java is installed and JAVA_HOME is in your environment
    at initCocosEnv (E:\tools\CocosCreator\resources\app.asar\editor\core\native-utils.js:1:2245)
    at initSettings (E:\tools\CocosCreator\resources\app.asar\editor\core\native-utils.js:1:3088)
    at Object.build (E:\tools\CocosCreator\resources\app.asar\editor\core\native-utils.js:1:16390)
    at Gulp.<anonymous> (E:\tools\CocosCreator\resources\app.asar\editor\core\gulp-build.js:1:16843)
    at module.exports (E:\tools\CocosCreator\resources\app.asar\node_modules\orchestrator\lib\runTask.js:34:7)
    at Gulp.Orchestrator._runTask (E:\tools\CocosCreator\resources\app.asar\node_modules\orchestrator\index.js:273:3)
    at Gulp.Orchestrator._runStep (E:\tools\CocosCreator\resources\app.asar\node_modules\orchestrator\index.js:214:10)
    at Gulp.Orchestrator.start (E:\tools\CocosCreator\resources\app.asar\node_modules\orchestrator\index.js:134:8)
    at E:\tools\CocosCreator\resources\app.asar\node_modules\gulp-sequence\index.js:63:12
    at apply (E:\tools\CocosCreator\resources\app.asar\node_modules\thunks\index.js:355:38)
    at Async.series.t (E:\tools\CocosCreator\resources\app.asar\editor\core\builder.js:1:3024)
    at E:\tools\CocosCreator\resources\app.asar\node_modules\async\lib\async.js:726:13
    at E:\tools\CocosCreator\resources\app.asar\node_modules\async\lib\async.js:52:16
    at E:\tools\CocosCreator\resources\app.asar\node_modules\async\lib\async.js:264:21
    at E:\tools\CocosCreator\resources\app.asar\node_modules\async\lib\async.js:44:16
    at E:\tools\CocosCreator\resources\app.asar\node_modules\async\lib\async.js:723:17
    at E:\tools\CocosCreator\resources\app.asar\node_modules\async\lib\async.js:167:37
    at Gulp.doneCallback (E:\tools\CocosCreator\resources\app.asar\editor\core\gulp-build.js:1:17321)
    at Gulp.Orchestrator.stop (E:\tools\CocosCreator\resources\app.asar\node_modules\orchestrator\index.js:150:9)


检测JAVA是否安装

然后以管理员方式运行CocosCreator,再次构建




版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

其他文章