我使用vs2015作为编辑器 .
这是我的config.xml文件
我已经安装了cordova-splashscreen插件
在我的应用程序图标已经显示,但不显示启动画面
<?xml version="1.0" encoding="utf-8"?>
<widget id="com.ionicframework.ionicblankapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>ionic-blankapp</name>
<description>
An Ionic Framework and Cordova project.
</description>
<author email="you@example.com" href="http://example.com.com/">
Your Name Here
</author>
<content src="index.html" />
<access origin="*" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<preference name="KeepRunning" value="True" />
<preference name="ShowTitle" value="True" />
<preference name="InAppBrowserStorageEnabled" value="True" />
<preference name="SuppressesIncrementalRendering" value="True" />
<preference name="windows-target-version" value="10.0" />
<preference name="SplashScreen" value="foo" />
<preference name="SplashScreenDelay" value="10000" />
<icon src="resources/icon.png" />
<plugin name="cordova-plugin-device" spec="~1.1.1" />
<plugin name="cordova-plugin-console" spec="~1.0.2" />
<plugin name="cordova-plugin-whitelist" spec="~1.2.1" />
<plugin name="cordova-plugin-statusbar" spec="~2.1.0" />
<plugin name="ionic-plugin-keyboard" spec="~1.0.8" />
<plugin name="cordova-plugin-splashscreen" version="3.1.0" />
</widget>
2 回答
像文档一样设置config.xml:
并确保所有启动文件都在正确的位置和正确的大小
请注意config.xml中的这一行具有正确的值,其中screen必须是生成的splashscreen的名称 .
如果您不确定生成的闪屏名称的名称,请查看内部,例如
platforms/android/res/...
如果您调用
ionic resources
,平台相关值将自动插入config.xml
. 您只需在resources
目录中插入icon.png
和splash.png
即可 .