2016-12-20 84 views
0

我尝试添加splashscreen到我的android和ios版本。对于IOS所有工作正常。但Android的所有时间我建立,所有的时间它只是告诉我的默认图标和启动画面....科尔多瓦splashscreen只显示默认的一个和默认的Android图标

,这里是我的config.xml

<content src="index.html" /> 
<access origin="*" /> 
<preference name="orientation" value="portrait" /> 
<preference name="AutoHideSplashScreen" value="true"/> 
<preference name="Fullscreen" value="true"/> 
<preference name="SplashScreen" value="screen"/> 
<preference name="SplashScreenDelay" value="4000"/> 
<preference name="FadeSplashScreenDuration" value="0"/> 
<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="res/screen/android/icon/drawable-ldpi-icon.png" density="ldpi"/> 
    <icon src="res/screen/android/icon/drawable-mdpi-icon.png" density="mdpi"/> 
    <icon src="res/screen/android/icon/drawable-hdpi-icon.png" density="hdpi"/> 
    <icon src="res/screen/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> 
    <icon src="res/screen/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> 
    <icon src="res/screen/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> 
    <splash src="res/screen/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/> 
    <splash src="res/screen/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/> 
    <splash src="res/screen/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/> 
    <splash src="res/screen/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/> 
    <splash src="res/screen/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/> 
    <splash src="res/screen/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/> 
    <splash src="res/screen/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/> 
    <splash src="res/screen/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/> 
    <splash src="res/screen/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/> 
    <splash src="res/screen/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/> 
    <splash src="res/screen/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/> 
    <splash src="res/screen/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/> 
</platform> 
<platform name="ios"> 
    <icon src="res/screen/ios/icon/icon.png" width="57" height="57"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="114" height="114"/> 
    <icon src="res/screen/ios/icon/icon-40.png" width="40" height="40"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="80" height="80"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="120" height="120"/> 
    <icon src="res/screen/ios/icon/icon-50.png" width="50" height="50"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="100" height="100"/> 
    <icon src="res/screen/ios/icon/icon-60.png" width="60" height="60"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="120" height="120"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="180" height="180"/> 
    <icon src="res/screen/ios/icon/icon-72.png" width="72" height="72"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="144" height="144"/> 
    <icon src="res/screen/ios/icon/icon-76.png" width="76" height="76"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="152" height="152"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="167" height="167"/> 
    <icon src="res/screen/ios/icon/icon-small.png" width="29" height="29"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="58" height="58"/> 
    <icon src="res/screen/ios/icon/[email protected]" width="87" height="87"/> 
    <splash src="res/screen/ios/splash/[email protected]~iphone.png" width="640" height="1136"/> 
    <splash src="res/screen/ios/splash/Default-667h.png" width="750" height="1334"/> 
    <splash src="res/screen/ios/splash/Default-736h.png" width="1242" height="2208"/> 
    <splash src="res/screen/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/> 
    <splash src="res/screen/ios/splash/[email protected]~ipad.png" width="2048" height="1536"/> 
    <splash src="res/screen/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/> 
    <splash src="res/screen/ios/splash/[email protected]~ipad.png" width="1536" height="2048"/> 
    <splash src="res/screen/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/> 
    <splash src="res/screen/ios/splash/[email protected]~iphone.png" width="640" height="960"/> 
    <splash src="res/screen/ios/splash/Default~iphone.png" width="320" height="480"/> 
    <preference name="webviewbounce" value="false" /> 
    <preference name="UIWebViewBounce" value="false" /> 
    <preference name="DisallowOverscroll" value="true" /> 
    <preference name="StatusBarOverlaysWebView" value="false" /> 
    <allow-intent href="itms:*" /> 
    <allow-intent href="itms-apps:*" /> 
</platform> 
<chcp> 
    <config-file url="http://localhost:31284/chcp.json" /> 
    <local-development enabled="true" /> 
</chcp> 
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/> 
<plugin name="cordova-plugin-whitelist" spec="1" /> 
<plugin name="cordova-plugin-device" spec="~1.1.3" /> 
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" /> 
<plugin name="ionic-plugin-keyboard" spec="https://github.com/driftyco/ionic-plugins-keyboard.git" /> 
<plugin name="cordova-plugin-splashscreen" spec="https://github.com/apache/cordova-plugin-splashscreen.git" /> 

我有这样的文件

RES/ - 屏幕/ ------安卓/ ------ IOS/

所有工作正常对于iOS,但对于Android不...如果有人可以帮助我,谢谢你!

回答

1

更新到最新版本的android平台。

cordova platform update [email protected] 

注:@6.1.0是很重要的,否则6.0.0版将被安装,你的问题就不会得到解决。

0

资源缓存在您的计算机上,因此您可以删除它们。

尝试删除整个文件夹(包括图标和飞溅):创造资源时

ionic resources

另一个常见的错误:

resources/android/splash

resources/ios/splash

然后跑到是它是splash.png尺寸问题。 Ionic提供的Photoshop Splash模板生成2732x2732像素图像。但由于某些原因,Ionic服务器根本不喜欢它。尝试调整并再次运行以下命令后:

ionic resources

希望它能帮助。

来自阿根廷的问候。

相关问题