科尔多瓦5.1.1闪屏不能正常工作 [英] Cordova 5.1.1 Splashscreen not working
问题描述
我试图让我的Android设备(红米手机1S,Android版本4.4.4 KTU84P)的闪屏的工作。该应用程序运行正常我的设备上,但启动画面不会出现。在启动画面的图像被复制和重命名为screen.png到各自的平台\机器人\水库\绘制*的目录。我还没有安装任何闪屏插件科尔多瓦。下面是config.xml中,在项目根目录下的内容。
I am trying to get the splashscreen work on my android device (Redmi 1S, Android Version 4.4.4 KTU84P). The app runs fine on my device, but the splashscreen does not appear. The splashscreen images gets copied and renamed as "screen.png" into the respective "platforms\android\res\drawable*" directories. I have not installed any splashscreen plugin for cordova. Below is the content from config.xml at project root directory.
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.victor.workshop" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Workshop</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" version="1" />
<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="res/android/icons/xhdpi.png"/>
<icon src="res/android/icons/ldpi.png" density="ldpi" />
<icon src="res/android/icons/mdpi.png" density="mdpi" />
<icon src="res/android/icons/hdpi.png" density="hdpi" />
<icon src="res/android/icons/xhdpi.png" density="xhdpi" />
<splash src="res/android/splashscreens/land-hdpi.png" density="land-hdpi"/>
<splash src="res/android/splashscreens/land-ldpi.png" density="land-ldpi"/>
<splash src="res/android/splashscreens/land-mdpi.png" density="land-mdpi"/>
<splash src="res/android/splashscreens/land-xhdpi.png" density="land-xhdpi"/>
<splash src="res/android/splashscreens/port-hdpi.png" density="port-hdpi"/>
<splash src="res/android/splashscreens/port-ldpi.png" density="port-ldpi"/>
<splash src="res/android/splashscreens/port-mdpi.png" density="port-mdpi"/>
<splash src="res/android/splashscreens/port-xhdpi.png" density="port-xhdpi"/>
</platform>
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="10000" />
</widget>
任何帮助或指针ap preciated。先谢谢了。
Any help or pointer appreciated. Thanks in advance.
推荐答案
由于科尔多瓦的Android 4.0闪屏插件才能显示启动画面
The splash screen plugin is required since cordova android 4.0 to show the splash screen
主要变化
开机画面功能现在通过插件提供的
Splash screen functionality is now provided via plugin
您将需要添加新的科尔多瓦 - 插件,闪屏插件来继续使用闪屏
You will need to add the new cordova-plugin-splashscreen plugin to continue using a splash screen
<一个href="https://cordova.apache.org/announcements/2015/04/15/cordova-android-4.0.0.html">https://cordova.apache.org/announcements/2015/04/15/cordova-android-4.0.0.html
所以,与安装
cordova plugin add cordova-plugin-splashscreen
和一切都应该在那之后只是工作
And everything should just work after that
这篇关于科尔多瓦5.1.1闪屏不能正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!