【发布时间】:2018-02-23 06:41:32
【问题描述】:
我正在使用 cordova-plugin-splashscreen 来显示启动画面。
https://www.npmjs.com/package/cordova-plugin-splashscreen
它以前可以工作,但不适用于新版本。这是我的配置文件:
<?xml version='1.0' encoding='utf-8'?>
<widget id="in.fifa" version="1.0" versionCode="005" xmlns:gap = "http://phonegap.com/ns/1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>FIFA18</name>
<description>
Sample Description
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Author Name
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" version="1"/>
<plugin name="cordova-plugin-splashscreen"/>
<platform name="android">
<splash src="screen.png" density="port-hdpi"/>
<splash src="screen.png" density="port-ldpi"/>
<splash src="screen.png" density="port-mdpi"/>
<splash src="screen.png" density="port-xhdpi"/>
</platform>
<icon src="icon.png" />
<preference name="SplashScreenDelay" value="1500"/>
<preference name="FadeSplashScreen" value="false"/>
<preference name="Orientation" value="portrait"/>
<preference name="LoadUrlTimeoutValue" value="40000"/>
<preference name="StatusBarOverlaysWebView" value="true"/>
<access origin="*" />
<allow-navigation href="*" />
<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:*" />
<preference name="android-minSdkVersion" value="15"/>
<preference name="android-targetSdkVersion" value="23"/>
<preference name="multiDexEnabled" value="true"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
启动画面图像在项目根文件夹中可用。是否有任何代码需要更改?谢谢!
【问题讨论】: