2

我正在使用cordova 为Windows 10 构建我的sencha touch 应用程序。对于 iOS 和 Android ,cordova 文档很好地解释了如何配置各种图标和闪屏。但是对于 Windows,该示例显示的图标很少,我尝试像示例中那样配置它们,但是当我使用 Visual Studio 打开 Windows 10 构建的解决方案时,我看到所有图标都是默认的科尔多瓦图标,而不是那些图标我已经配置了。

我在 config.xml 中添加了这些行

<platform name="wp8">
    <splash src="../resources/splashscreen/wp8/SplashScreenImage.png" width="768" height="1280"/>
    <icon src="../resources/icons/wp8/ApplicationIcon.png" width="99" height="99" />
    <!-- tile image -->
    <icon src="../resources/icons/wp8/Background.png" width="159" height="159" />
</platform>

<platform name="windows8">
    <splash src="../resources/splashscreen/windows8/SplashScreenImage.png" width="620" height="300"/>

    <icon src="../resources/icons/windows8/logo.png" width="150" height="150" />
    <icon src="../resources/icons/windows8/smalllogo.png" width="30" height="30" />
    <icon src="../resources/icons/windows8/storelogo.png" width="50" height="50" />
</platform>

但是在visual studio中,我看到了这些图标,所有图标都取自cordova默认图标,带有“droid”的图标:

应用程序图标

有没有办法在 config.xml 中配置 Windows 10 图标?在科尔多瓦文档中,我找不到任何关于此的内容。

提前致谢

4

1 回答 1

1

You add this in config.xml for the Windows platform icons:

<platform name="windows">
    <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" />
</platform>

You place your custom icons at res/windows folder.

When you build the app, it will use these icons.

Also note that in your code you used platform name="windows8" and it should be "windows".

于 2016-08-15T22:44:08.573 回答