PhoneGap Windows应用程序 - 图像问题

时间:2016-08-05 07:55:53

标签: cordova windows-phone-8 windows-phone-8.1 phonegap-build

我想使用PhoneGap生成Windows应用程序,我整理了所有的东西,生成应用程序并要求在Windows开发网站上发布应用程序。 我收到微软的反馈,我的应用程序因为:

而失败

图像文件StoreLogo.scale-100.png是默认图像。

图像文件Square310x310Logo.scale-100.png是默认图像。

我使用这个指南来创建xml: https://cordova.apache.org/docs/en/latest/config_ref/images.html#windows http://www.badpenguin.org/how-to-make-your-ionic-cordova-app-to-run-under-windows-phone-8-1-and-desktop

这是我的config.xml Windows部分:

<platform name="windows">
    <preference name="windows-identity-name" value="PhonegapBuild.PGBDeveloper" /> 


    <icon src="res/windows/storelogo.png" target="StoreLogo" />
    <icon src="res/windows/smalllogo.png" target="Square30x30Logo" />
    <icon src="res/Windows/Square44x44Logo.png" target="Square44x44Logo" />
    <icon src="res/Windows/Square70x70Logo.png" target="Square70x70Logo" />
    <icon src="res/Windows/Square71x71Logo.png" target="Square71x71Logo" />
    <icon src="res/Windows/Square150x150Logo.png" target="Square150x150Logo" />
    <icon src="res/Windows/Square310x310Logo.png" target="Square310x310Logo" />
    <icon src="res/Windows/Wide310x150Logo.png" target="Wide310x150Logo" />

    <icon src="res/Windows/logo.png" width="150" height="150" />
    <icon src="res/Windows/smalllogo.png" width="30" height="30" />
    <icon src="res/Windows/storelogo.png" width="50" height="50" />
    <icon src="res/Windows/Square44x44Logo.scale-100.png" width="44" height="44" />
    <icon src="res/Windows/Square44x44Logo.scale-240.png" width="106" height="106" />
    <icon src="res/Windows/Square70x70Logo.scale-100.png" width="70" height="70" />
    <icon src="res/Windows/Square71x71Logo.scale-100.png" width="71" height="71" />
    <icon src="res/Windows/Square71x71Logo.scale-240.png" width="170" height="170" />
    <icon src="res/Windows/Square150x150Logo.scale-240.png" width="360" height="360" />
    <icon src="res/Windows/Square310x310Logo.scale-100.png" width="310" height="310" />
    <icon src="res/Windows/Wide310x150Logo.scale-100.png" width="310" height="150" />
    <icon src="res/Windows/Wide310x150Logo.scale-240.png" width="744" height="360" />

</platform>

当我去gerated包.appx并打开图像根文件夹时,我发现有些图标是PhoneGap默认图标: 这正是这两个图标。 我不知道如何更改config.xml来更改这些图标。我试着添加

<icon src="res/Windows/StoreLogo.scale-100.png" width="50" height="50" />

但什么都没发生。 所有需要的图标我有res / Windows目录并指向config.xml文件,但phonegap在生成.appx文件期间没有更改这两个图标。

1 个答案:

答案 0 :(得分:0)

我有类似的经历。我从Windows Dev发来的消息是: 品牌验证测试遇到以下错误:     图像文件StoreLogo.scale-100.png是默认图像。     图像文件Square150x150Logo.scale-100.png是默认图像。     图像文件Wide310x150Logo.scale-100.png是默认图像。

我解决了这些错误如下: (1)我删除了www / src / icon / windows文件夹中的所有(Phonegap默认)图像。 (2)我创建了三个与上面对应的app图标,尺寸正确,即50x50,150x150和310x150像素。这些必须正是这些尺寸。 (3)我通过从每个文件名中省略.scale-100来稍微改变这些图标的名称。 (4)我在config.xml中只提到了这些新图标,如下所示:

<platform name="winphone">
    <icon src="res/icon/windows/StoreLogo.png" width="50" height="50" />
    <icon src="res/icon/windows/Square150x150Logo.png" width="150" height="150" />
    <icon src="res/icon/windows/Wide310x150Logo.png" width="310" height="150" />
</platform>

(5)另请注意,平台名称是&#34; winphone&#34;不是&#34; windows&#34;正如你所使用的那样。我试过&#34; windows&#34;作为解决这些问题的几十次尝试之一,但它没有奏效。 (6)我之前尝试过一种更简单,更成功的解决方案。这是使用早期版本的Phonegap Build,方法是在平台标签之前将以下行放在config.xml中:

<preference name="phonegap-version" value="cli-5.4.1" />

这很有用,但我担心这样一个早期的Phonegap版本可能会导致其他问题。请注意,我目前正在使用cli-6.0.0,但这是为了避免Windows 10证书签名的复杂性。