【发布时间】:2015-01-21 16:44:01
【问题描述】:
我尝试在我的项目的 res/xml/config.xml 文件中添加闪屏插件。
这就是我想要的:
<?xml version='1.0' encoding='utf-8'?>
<widget id="fr.myname.firstapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
<name>FirstApp</name>
<description>
this is my first app
</description>
<author email="email@example.com" href="http://example.com">
My name
</author>
<content src="index.html" />
<access origin="*" subdomains="true" />
<preference name="loglevel" value="DEBUG" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="4000" />
<feature name="Notification">
<param name="android-package" value="org.apache.cordova.dialogs.Notification" />
</feature>
...
</widget>
使用“cordova build android”命令构建应用程序后,我添加的两行已经消失:
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="4000" />
是什么原因造成的?我不明白为什么它会覆盖我的更改,而我只是遵循官方文档。
感谢您的帮助。
【问题讨论】: