Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/208.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PWA Android/chrome splashscreen上显示错误图标_Android_Google Chrome_Manifest_Splash Screen - Fatal编程技术网

PWA Android/chrome splashscreen上显示错误图标

PWA Android/chrome splashscreen上显示错误图标,android,google-chrome,manifest,splash-screen,Android,Google Chrome,Manifest,Splash Screen,这是manifest.json,我使用它在chrome/android splashscreen上为我的PWA显示最大的图标: { "name": "App name", "short_name": "App name", "icons": [ { "src": "icons/touchIcon-192x192.png", "sizes": "192x192", "type": "image/png"

这是manifest.json,我使用它在chrome/android splashscreen上为我的PWA显示最大的图标:

{
"name": "App name",
"short_name": "App name",
"icons": [                
    {  
      "src": "icons/touchIcon-192x192.png",
      "sizes": "192x192",  
      "type": "image/png"  
    },  
    {  
      "src": "icons/touchIcon-256x256.png",
      "sizes": "256x256",  
      "type": "image/png"  
    },  
    {  
      "src": "icons/touchIcon-384x384.png",
      "sizes": "384x384",  
      "type": "image/png"  
    },  
    {  
      "src": "icons/touchIcon-512x512.png",
      "sizes": "512x512",  
      "type": "image/png"  
    }
],
"background_color": "#323A4F",
"theme_color": "#323A4F",
"start_url": "/?standalone",
"display": "standalone",
"orientation": "portrait",
"lang": "fr"
}

问题是chrome总是在屏幕中央显示一个非常小的图标,我想大约48像素

有什么想法吗?提前谢谢

根据:

128dp是启动屏幕上图像的理想尺寸,因为它意味着 不会对图像应用缩放。现在,我们web开发人员不这样做 处理dp的问题。我们使用物理像素或CSS像素。就 仅清单中的初始屏幕和配置物理像素 都被考虑了。1dp是1个物理像素,屏幕密度为160dpi

160 dpi时1dp=1px

1x(160dpi)时的128dp=128px 1.5x(240dpi)时的128dp=192px(128*( 240/160)在2x(320dpi)时128dp=在3x(480dpi)时256px 128dp= 384px(相当于Nexus 5)在4x时的128dp(640dpi)=512px(Nexus 6是 在3和4之间)


经过一些尝试和挫折,我发现你必须只指定清单中带有512px的图标,否则它将使用一个较低的DP图标作为应用程序图标,并基于此,它将使用大或小的布局进行启动。 您可以在此处阅读更多信息:此处: