【发布时间】:2014-09-20 08:21:11
【问题描述】:
我正在为 iOS 和 Android 开发一个应用程序,我正在使用 Phonegap Build 来创建它。我想显示启动画面,我为每个平台创建了 .png 文件;在 iOS 中一切正常,但在 Android 中不会出现启动画面。
我的 config.xml 看起来像这样(相关代码):
<preference name="phonegap-version" value="3.4.0" />
<preference name="orientation" value="portrait" />
<gap:plugin name="org.apache.cordova.splashscreen" version="0.2.7" />
<!-- Android -->
<gap:splash src="screen/android/screen-ldpi-port.png" gap:platform="android" gap:qualifier="ldpi" />
<gap:splash src="screen/android/screen-mdpi-port.png" gap:platform="android" gap:qualifier="mdpi" />
<gap:splash src="screen/android/screen-hdpi-port.png" gap:platform="android" gap:qualifier="hdpi" />
<gap:splash src="screen/android/screen-xhdpi-port.png" gap:platform="android" gap:qualifier="xhdpi"/>
<!-- iOS -->
<gap:splash src="screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="screen/ios/screen-ipad-portrait-2x.png" gap:platform="ios" width="1536" height="2008" />
我按照Phonegap Documentation 创建我的启动画面,Android 的尺寸是:
- screen-ldpi-port.png – (320 x 426)
- screen-mdpi-port.png – (320 x 470)
- screen-hdpi-port.png – (480 x 640)
- screen-xhdpi-port.png – (720 x 960)
有解决办法吗?谢谢!
【问题讨论】:
标签: android splash-screen phonegap-build