creator 3.4命令构建老是不识别命令中的宽高度参数

我的命令构建没有报错,也没有任何问题,只是构建出来的index.html 里面的有个标签

<div id="GameDiv" style="width: 1280px; height: 960px;">
  <div id="Cocos3dGameContainer">
    <canvas id="GameCanvas" width="1280" height="960"></canvas>
  </div>

但是我配置的是720 1280 这让我很是头疼 找不到原因 求各位大大解决方案 。

附上我的代码

/Applications/CocosCreator/Creator/3.4.2/CocosCreator.app/Contents/MacOS/CocosCreator --project /Users/hc101/Documents/work/character/ --build "
platform=web-desktop;
debug=true;
replaceSplashScreen=true;
startScene=da136ac3-d6a6-44e1-909c-f590d46414b1;
outputName=web-desktop;
md5Cache=true;
sourceMaps=false;
buildPath=project://build;
replaceSplashScreen=true;
mainBundleCompressionType=merge_dep;
mainBundleIsRemote=false;
mergeStartScene=false;
experimentalEraseModules=false;
compressTexture=true;
packAutoAtlas=true;
scenes=[
{
url: ‘db://assets/Scenes/Game.scene’,
uuid: ‘da136ac3-d6a6-44e1-909c-f590d46414b1’,
inBundle: false
}
];
packages:{
web-desktop:{
resolution:{
designWidth:720,
designHeight:1280
},
polyfills:{
asyncFunctions:true
}
},
cocos-service: {
configID: ‘e43a6b’,
services: [
{
service_id: ‘235’,
service_component_name: ‘service-analytics’,
builder: ‘/Users/hc101/.CocosCreator/.service/analytics/builder/builder.js’,
enable: false,
params: {}
}
],
version: ‘3.0.2’
}
}";

顶一下 顶一下

resources\.editors\Creator\3.6.0\CocosCreator.exe --project E:\NewProject --build "platform=android;packages="{"""android""":{"""packageName""":"""com.test.tt"""}}""
目测,你 package 字段下 json 数据都没读取到

我一开始也怀疑 但是我改了很多格式都不行 谢谢你帮我看看哪里有问题?

为什么你这个这么多引号。。。。

https://blog.51cto.com/u_11283245/5236624
建议使用 configpath ,直接使用导出的配置文件

你好 你可以看看我的代码吗 我就是直接用的导出的json里面的字段

你好 我的参数还是没有被读取到 那个json格式应该怎么写呢

大家好 我已经解决了 附上解决方案


主要可以自己去指定那个configPath 就行