Splashscreen未在Phonegap 3.3上显示

时间:2014-01-21 11:28:23

标签: cordova phonegap-plugins

我的应用程序中没有显示启动画面,这是我的config.xml中有关splashscreen的部分,位于根目录中:

<feature name="SplashScreen">
    <param name="ios-package" value="CDVSplashScreen" />
</feature>

<feature name="SplashScreen">
    <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" />
</feature>

<preference name="SplashScreen" value="splash" />
<preference name="SplashScreenDelay" value="10000" />

<gap:splash gap:density="ldpi" gap:platform="android" src="res/screen/android/screen-ldpi-portrait.png" />
<gap:splash gap:density="mdpi" gap:platform="android" src="res/screen/android/screen-mdpi-portrait.png" />
<gap:splash gap:density="hdpi" gap:platform="android" src="res/screen/android/screen-hdpi-portrait.png" />
<gap:splash gap:density="xhdpi" gap:platform="android" src="res/screen/android/screen-xhdpi-portrait.png" />

<gap:splash gap:platform="ios" height="480" src="res/screen/ios/screen-iphone-portrait.png" width="320" />
<gap:splash gap:platform="ios" height="960" src="res/screen/ios/screen-iphone-portrait-2x.png" width="640" />
<gap:splash gap:platform="ios" height="1024" src="res/screen/ios/screen-ipad-portrait.png" width="768" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/screen-ipad-landscape.png" width="1024" />

这是正确安装的插件:

smartbox:yo du$ phonegap local plugin list | grep splash  
[phonegap] org.apache.cordova.splashscreen

这些是文件:

smartbox:yo du$ ls www/res/screen/android/
screen-hdpi-landscape.png   screen-ldpi-portrait.png    screen-xhdpi-landscape.png
screen-hdpi-portrait.png    screen-mdpi-landscape.png   screen-xhdpi-portrait.png
screen-ldpi-landscape.png   screen-mdpi-portrait.png
smartbox:yo du$ ls www/res/screen/ios/
screen-ipad-landscape-2x.png        screen-iphone-landscape.png
screen-ipad-landscape.png       screen-iphone-portrait-2x.png
screen-ipad-portrait-2x.png     screen-iphone-portrait-568h-2x.png
screen-ipad-portrait.png        screen-iphone-portrait.png
screen-iphone-landscape-2x.png

任何提示/想法?我正在使用phonegap 3.3.0-0.18.0
我错过了什么?

感谢。

1 个答案:

答案 0 :(得分:6)

目前,www / res和gap:splash中的文件仅用于phonegap构建版本,不适用于本地版本。

要为本地版本自定义启动画面,您必须在平台文件夹中执行此操作。 请参阅页面底部的http://docs.phonegap.com/en/3.3.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens