creatorv2.4.3构建Android项目时,在 构建 环节出了错误,而且是必现的,具体是在 Start building assets 时报失败。错误信息如下:
Load assets/resources/index.js failed! Error: Load assets/resources/index.js failed!
具体的错误上下文,
初步判断是resources资源相关的问题,我的资源名称除了大写(比如resources/Prefab),应该没有什么特别的。
No needs to indicate the 'cc.String' attribute for "CustomLabel.key", which its default value is type of String.
The type of "AbstractNumberView.INTENT_NO" must be cc.Float or cc.Integer, not Number.
The type of "SlideView.slideThreshold" must be cc.Float or cc.Integer, not Number.
The type of "SlideView.enableMoveDetect" must be cc.Boolean, not Boolean.
The type of "TouchScaleView.maxScale" must be cc.Float or cc.Integer, not Number.
The type of "TouchScaleView.minScale" must be cc.Float or cc.Integer, not Number.
The type of "TouchScaleView.enableScale" must be cc.Boolean, not Boolean.
Building /Users/xxx/CocosCreatorProjects/xxx
Destination /Users/xxx/CocosCreatorProjects/xxx/build/jsb-link
Delete /Users/xxx/CocosCreatorProjects/xxx/build/jsb-link/assets/**/*,/Users/xxx/CocosCreatorProjects/xxx/build/jsb-link/remote/**/*,/Users/xxx/CocosCreatorProjects/xxx/build/jsb-link/src/**/*
Checked Python Version [2.7.16]
Creating native cocos project to /Users/xxx/CocosCreatorProjects/xxx/build/jsb-link
> Copy template into /Users/xxx/CocosCreatorProjects/xxx/build/tempCocosProject
> Copying files from template directory...
> Copying files from cocos root directory...
> Rename project name from 'HelloJavascript' to 'tempCocosProject'
> Replace the project name from 'HelloJavascript' to 'tempCocosProject'
> Replace the project package name from 'org.cocos2dx.hellojavascript' to 'org.cocos2dx.tempCocosProject'
> Replace the Mac bundle id from 'org.cocos2dx.hellojavascript' to 'org.cocos2dx.tempCocosProject'
> Replace the iOS bundle id from 'org.cocos2dx.hellojavascript' to 'org.cocos2dx.tempCocosProject'
Start building assets
** 这里是错误堆栈 **
Load assets/resources/index.js failed! Error: Load assets/resources/index.js failed!
at HTMLScriptElement.errorHandler (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/download-script.js:75:30)
at Task.onComplete (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/load.js:86:16)
at /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/pipeline.js:331:33
at Array.<anonymous> (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/load.js:124:5)
at finale (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/downloader.js:556:24)
at /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/utilities.js:154:23
at /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/downloader.js:161:7
at HTMLScriptElement.errorHandler (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/download-script.js:75:19)
Load assets/resources/index.js failed! Error: Load assets/resources/index.js failed!
at HTMLScriptElement.errorHandler (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/download-script.js:75:30)
at /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/CCAssetManager.js:683:12
at /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/platform/utils.js:74:9
at processTicksAndRejections (internal/process/task_queues.js:79:9)
Build Failed: Error: Load assets/resources/index.js failed!
at HTMLScriptElement.errorHandler (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/asset-manager/download-script.js:75:30)
at EventEmitter.o (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:9558)
at Object.onceWrapper (events.js:282:20)
at EventEmitter.emit (events.js:194:13)
at EventEmitter.emit (domain.js:469:20)
at EventEmitter.<anonymous> (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/main/ipc.js:1:3399)
at EventEmitter.emit (events.js:194:13)
at EventEmitter.emit (domain.js:469:20)
at WebContents.<anonymous> (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/electron.asar/browser/api/web-contents.js:390:13)
at WebContents.emit (events.js:194:13)
at WebContents.EventEmitter.emit (domain.js:469:20)
at /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/editor/lib/builder/index.js:1:3838
at wrapper (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:272:20)
at next (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:4584:24)
at /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/node_modules/async/dist/async.js:325:20
at /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:5860
at Gulp.<anonymous> (/Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/app.asar/editor/core/gulp-build.js:1:26114)
at Object.onceWrapper (events.js:282:20)
at Gulp.emit (events.js:194:13)
at Gulp.EventEmitter.emit (domain.js:469:20)