我无法解释为什么我的XML文件无法正常工作。它位于我的资产www文件夹中,图像的链接是正确的 - 我的应用程序的ID是相同的,但它仍然不会显示我的启动画面或图标!
帮助!
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.helloword"
version = "1.0.0">
<name>Testerm Application</name>
<description>
A test application for PhoneGap
</description>
<author href="graemeleighfield@infinitegroup.co.uk" email="graemeleighfield@infinitegroup.co.uk">
Graeme Leighfield
</author>
<icon src="img/icon.png" width="72" height="72" ></icon>
<gap:spalsh src="img/ash.jpg"/>
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/network"/>
</widget>
答案 0 :(得分:7)
是的,config.xml仅适用于build.phonegap.com。
在res / drawable-hdpi文件夹中创建一个带有splash.png文件名的斜杠屏幕。 将super.setIntegerProperty(“splashscreen”,R.drawable.splash)添加到App.java文件中。
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html");
}
答案 1 :(得分:4)
如果是,那么config.xml并不应该“完全工作 - 它仅适用于http://build.phonegap.com - 不适用于您的本地开发。