开始构建,选择android平台, 过了2分钟就奔溃了,在windows和mac上都尝试过不行,重启电脑也不行。我们项目规模比较大, 难道cocos creator只能做做小游戏吗?
怀疑是内存不够用导致, 下面是奔溃日志:
Start to build platform [android]
[ start [ ] 0% 0.0s ][16630] Start building with options : {
“title”: “game”,
“packageName”: “”,
“startScene”: “a51611a9-1d26-428f-81fe-2d521eec9ff7”,
“excludeScenes”: [],
“includeSDKBox”: false,
“orientation”: {
“landscapeLeft”: true,
“landscapeRight”: true,
“portrait”: false,
“upsideDown”: false
},
“webOrientation”: “auto”,
“inlineSpriteFrames”: true,
“inlineSpriteFrames_native”: true,
“mergeStartScene”: false,
“optimizeHotUpdate”: false,
“md5Cache”: false,
“encryptJs”: false,
“xxteaKey”: “db1ae5a2-240a-46”,
“zipCompressJs”: true,
“fb-instant-games”: {},
“android”: {
“packageName”: “”
},
“ios”: {
“packageName”: “”
},
“mac”: {
“packageName”: “”
},
“win32”: {},
“android-instant”: {
“REMOTE_SERVER_ROOT”: “”,
“host”: “”,
“packageName”: “”,
“pathPattern”: “”,
“recordPath”: “”,
“scheme”: “https”,
“skipRecord”: false
},
“appBundle”: false,
“platform”: “android”,
“actualPlatform”: “android”,
“template”: “default”,
“buildPath”: “/Users/xixi/Downloads/game2/game/build”,
“debug”: true,
“sourceMaps”: true,
“embedWebDebugger”: false,
“previewWidth”: “1280”,
“previewHeight”: “720”,
“useDebugKeystore”: true,
“apiLevel”: “android-29”,
“appABIs”: [],
“vsVersion”: “auto”,
“buildScriptsOnly”: false,
“dest”: “/Users/xixi/Downloads/game2/game/build/jsb-default”,
“excludedModules”: [
“3D Physics/Builtin”
],
“autoCompile”: false,
“scenes”: [
“a51611a9-1d26-428f-81fe-2d521eec9ff7”,
“e758e075-e2d4-46ba-bd28-b8724dd04a3c”
],
“project”: “/Users/xixi/Downloads/game2/game”,
“projectName”: “game”,
“debugBuildWorker”: false
}
Builder: do custom process [build-start]
[16630] [onBuildStart]:Building android to /Users/xixi/Downloads/game2/game/build/jsb-default
[16630] [build_resource_list] build res list to: /Users/xixi/Downloads/game2/game/assets/resources/res_pair.cfg
[16630] Building /Users/xixi/Downloads/game2/game
[16630] Destination /Users/xixi/Downloads/game2/game/build/jsb-default
[16630] Delete /Users/xixi/Downloads/game2/game/build/jsb-default/subpackages//*,/Users/xixi/Downloads/game2/game/build/jsb-default/res//,/Users/xixi/Downloads/game2/game/build/jsb-default/src/**/
Cocos2dx root: /Applications/CocosCreator.app/Contents/Resources/cocos2d-x
native environment string : COCOS_FRAMEWORKS=/Applications/CocosCreator.app/Contents/Resources/;COCOS_X_ROOT=/Applications/CocosCreator.app/Contents/Resources/cocos2d-x;COCOS_CONSOLE_ROOT=/Applications/CocosCreator.app/Contents/Resources/cocos2d-x/tools/cocos2d-console/bin;NDK_ROOT=/Users/xixi/Documents/Android/Sdk2/ndk-bundle;ANDROID_SDK_ROOT=/Users/xixi/Documents/Android/Sdk2
[16630] Checked Python Version [2.7.16]
Cocos2dx root: /Applications/CocosCreator.app/Contents/Resources/cocos2d-x
[ cut-engine [ ] 0% 0.0s ][16630] Building 3D physics modules…
Browserslist: caniuse-lite is outdated. Please run next command npm update
build jsb-adapter: 686.556ms
[ compile [==== ] 10% 0.0s ]
<— Last few GCs —>
[16777:0x116993000] 73533 ms: Mark-sweep 2029.6 (2082.6) -> 2029.1 (2082.6) MB, 1310.4 / 0.0 ms (average mu = 0.085, current mu = 0.004) allocation failure scavenge might not succeed
[16777:0x116993000] 74874 ms: Mark-sweep 2029.7 (2082.6) -> 2029.6 (2082.6) MB, 1339.4 / 0.0 ms (average mu = 0.043, current mu = 0.001) allocation failure scavenge might not succeed
<— JS stacktrace —>
==== JS stack trace =========================================
0: ExitFrame [pc: 0x11057c42b]
1: StubFrame [pc: 0x11057d63f]
Security context: 0x0044d3642321 <String[#7]: file://>
2: ArraySet_indexOf [0x449596b269] [/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/source-map/lib/array-set.js:~74] [pc=0x44bb2cb83a](this=0x0044cb9a0bb1 ,0x0044e75fa7d1 <String[#3]: pet>)
3: SourceMapGenerator_serializeMappings [0x449596bf59] [/Applicati…
[16630] Error: Window “worker” crashed: [object Object]
at WebContents. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor-framework/lib/main/window.js:1:2497)
at WebContents.emit (events.js:199:15)
at WebContents.EventEmitter.emit (domain.js:469:20)
at WebContents.topLevelDomainCallback (domain.js:124:23)
[16630] Worker window crashed, reload to restart worker