I cant for the life of me figure out why my XML file isnt working. Its locaed in my assets www folder, the links to the images are correct - the id of my application is the same, but it still wont show my splash screen OR icon!
我不能为我的生活弄清楚为什么我的XML文件不起作用。它位于我的资产www文件夹中,图像的链接是正确的 - 我的应用程序的ID是相同的,但它仍然不会显示我的启动画面或图标!
Help!
<?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>
2 个解决方案
#1
4
Graeme, are you building localy in eclipse?
格雷姆,你在日食中建造当地人吗?
If yes, then config.xml and shouldnt' work at all -- it's for http://build.phonegap.com only -- not for your local development.
如果是,那么config.xml并不应该“完全工作 - 它仅适用于http://build.phonegap.com - 不适用于您的本地开发。
#2
7
Yes the config.xml is only for build.phonegap.com.
是的,config.xml仅适用于build.phonegap.com。
For building with Eclipse:
Create a slash screen with splash.png filename in the res/drawable-hdpi folder. Add super.setIntegerProperty("splashscreen", R.drawable.splash) to your App.java file.
在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
Graeme, are you building localy in eclipse?
格雷姆,你在日食中建造当地人吗?
If yes, then config.xml and shouldnt' work at all -- it's for http://build.phonegap.com only -- not for your local development.
如果是,那么config.xml并不应该“完全工作 - 它仅适用于http://build.phonegap.com - 不适用于您的本地开发。
#2
7
Yes the config.xml is only for build.phonegap.com.
是的,config.xml仅适用于build.phonegap.com。
For building with Eclipse:
Create a slash screen with splash.png filename in the res/drawable-hdpi folder. Add super.setIntegerProperty("splashscreen", R.drawable.splash) to your App.java file.
在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");
}