2016-11-29 92 views
0

我正在构建与Ionic框架混合应用程序。离子 - 更改/删除默认(科尔多瓦)启动徽标

我在更改Android上的默认应用程序图标和“启动屏幕”时遇到问题。我已将一个自定义icon.png和splash.png添加到/ resources。之后,我跑了ionic resources,但默认的图标/屏幕仍然存在。我已经从我的设备中删除了应用程序,重建了它等。

任何想法?

这里是我的config.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<widget id="com.ionicframework.palabi969346" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 
    <name>xyzApp</name> 
    <description>xyzDescription</description> 
    <author email="[email protected]" href="xyz-app.com">xyzAuthor</author> 
    <content src="index.html"/> 
    <access origin="*"/> 
    <allow-intent href="http://*/*"/> 
    <allow-intent href="https://*/*"/> 
    <allow-intent href="tel:*"/> 
    <allow-intent href="sms:*"/> 
    <allow-intent href="mailto:*"/> 
    <allow-intent href="geo:*"/> 
    <platform name="android"> 
    <allow-intent href="market:*"/> 
    <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/> 
    <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/> 
    <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/> 
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> 
    <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> 
    <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> 
    <splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/> 
    <splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/> 
    <splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/> 
    <splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/> 
    <splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/> 
    <splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/> 
    <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/> 
    <splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/> 
    <splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/> 
    <splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/> 
    <splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/> 
    <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/> 
    </platform> 
    <platform name="ios"> 
    <allow-intent href="itms:*"/> 
    <allow-intent href="itms-apps:*"/> 
    <icon src="resources/ios/icon/icon.png" width="57" height="57"/> 
    <icon src="resources/ios/icon/[email protected]" width="114" height="114"/> 
    <icon src="resources/ios/icon/icon-40.png" width="40" height="40"/> 
    <icon src="resources/ios/icon/[email protected]" width="80" height="80"/> 
    <icon src="resources/ios/icon/[email protected]" width="120" height="120"/> 
    <icon src="resources/ios/icon/icon-50.png" width="50" height="50"/> 
    <icon src="resources/ios/icon/[email protected]" width="100" height="100"/> 
    <icon src="resources/ios/icon/icon-60.png" width="60" height="60"/> 
    <icon src="resources/ios/icon/[email protected]" width="120" height="120"/> 
    <icon src="resources/ios/icon/[email protected]" width="180" height="180"/> 
    <icon src="resources/ios/icon/icon-72.png" width="72" height="72"/> 
    <icon src="resources/ios/icon/[email protected]" width="144" height="144"/> 
    <icon src="resources/ios/icon/icon-76.png" width="76" height="76"/> 
    <icon src="resources/ios/icon/[email protected]" width="152" height="152"/> 
    <icon src="resources/ios/icon/[email protected]" width="167" height="167"/> 
    <icon src="resources/ios/icon/icon-small.png" width="29" height="29"/> 
    <icon src="resources/ios/icon/[email protected]" width="58" height="58"/> 
    <icon src="resources/ios/icon/[email protected]" width="87" height="87"/> 
    <splash src="resources/ios/splash/[email protected]~iphone.png" width="640" height="1136"/> 
    <splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/> 
    <splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/> 
    <splash src="resources/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/> 
    <splash src="resources/ios/splash/[email protected]~ipad.png" width="2048" height="1536"/> 
    <splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/> 
    <splash src="resources/ios/splash/[email protected]~ipad.png" width="1536" height="2048"/> 
    <splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/> 
    <splash src="resources/ios/splash/[email protected]~iphone.png" width="640" height="960"/> 
    <splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/> 
    </platform> 
    <preference name="webviewbounce" value="false"/> 
    <preference name="UIWebViewBounce" value="false"/> 
    <preference name="DisallowOverscroll" value="true"/> 
    <preference name="android-minSdkVersion" value="16"/> 
    <preference name="BackupWebStorage" value="none"/> 
    <preference name="SplashMaintainAspectRatio" value="true"/> 
    <preference name="FadeSplashScreenDuration" value="300"/> 
    <preference name="SplashScreen" value="screen"/> 
    <preference name="SplashScreenDelay" value="3000"/> 
    <feature name="StatusBar"> 
    <param name="ios-package" onload="true" value="CDVStatusBar"/> 
    </feature> 
    <plugin name="cordova-plugin-device" spec="~1.1.3"/> 
    <plugin name="cordova-plugin-console" spec="~1.0.4"/> 
    <plugin name="cordova-plugin-whitelist" spec="~1.3.0"/> 
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/> 
    <plugin name="cordova-plugin-statusbar" spec="~2.2.0"/> 
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1"/> 
    <!--<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>--> 
</widget> 

Default boot screen

+0

你看过'resources/ios/icon /'或'resources/android/icon /'文件夹或其他文件夹吗?我有很多'离子资源'的实例显示输出,但实际上并没有生成启动画面或应用程序图标。所以请检查这些文件夹,并确保生成的文件看起来像你的应用程序图标和启动画面,否则问题是'离子资源'。 – Dexter

回答

0

您需要在您的应用程序离子配置闪屏。 在这里你可以找到整个文档修改此:

http://ionicframework.com/docs/cli/icon-splashscreen.html

在生成过程中,科尔多瓦(3.6版或更高版本)将寻找通过该项目的config.xml文件,并复制新创建的资源图片到平台的特定资源文件夹。例如,Android的资源文件夹可以在platforms/android/res中找到,而iOS使用platforms/ios/APP_NAME/Resources。这里的文件是正确的?

问候。