我'm developing an app for iOS and Android, I' m使用 Phonegap Build 来创建它 . 我想要显示Splash Screens,我为每个平台创建了.png文件;在iOS中一切正常但在 Android 中没有出现Splash Screens .
我的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)
有什么想法解决它吗?谢谢!
2 回答
您没有默认的splash标记
它在文档中:http://docs.phonegap.com/phonegap-build/configuring/icons-and-splash/
您需要查看PhoneGap Build文档,而不仅仅是PhoneGap文档 . 构建很特别 .
You can also try this , its work for me
Similarly for other platform you can try