React Native Expo 发布的应用程序未正确显示徽标

问题描述 投票:0回答:1

我在 Google Play 上发布了一个应用程序。徽标到处都很好,但是当我从 Google Play 在物理设备上安装应用程序时,它不会显示我的应用程序的完整徽标。奇怪的行为,有点像放大,切断边缘。 我怀疑这与我的 app.json 有关,我尝试了一堆图像尺寸,也许我没有尝试正确的尺寸。

"icon": "./192.png",
"android": {
  "adaptiveIcon": {
    "foregroundImage": "./Icon.png",
    "backgroundImage": "./BG.png"
},

这是我尝试过的最新代码。 192.png 基本上是 192 x 192 图像。 Icon.png 是图标图像本身(不包括图标的背景)。 BG.png 是图像的背景颜色。

How I expected it to show up once installed How it shows up once installed

我也尝试在图标字段中使用 512 x 512 png 图像,但这也不起作用。

javascript react-native expo google-play google-play-console
1个回答
0
投票

您必须在图标的app.json中正确添加资产的路径,

喜欢

"icon": "./assetsPath/example.png",
"android": {
  "adaptiveIcon": {
    "foregroundImage": "./assetsPath/example.png",
    "backgroundImage": "./assetsPath/example.png"
},

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.