简体   繁体   English

Eclipse android phonegap config.xml 不工作?

[英]Eclipse android phonegap config.xml not working?

I can't for the life of me figure out why my XML file isn't working.我终生无法弄清楚为什么我的 XML 文件不起作用。 It's located in my assets www folder: The links to the images are correct - the id of my application is the same, but it still won't show my splash screen OR icon!它位于我的资产 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>

Yes the config.xml is only for build.phonegap.com.是的,config.xml 仅适用于 build.phonegap.com。

For building with Eclipse:使用 Eclipse 构建:

Create a slash screen with splash.png filename in the res/drawable-hdpi folder.在 res/drawable-hdpi 文件夹中创建一个带有 splash.png 文件名的斜线屏幕。 Add super.setIntegerProperty("splashscreen", R.drawable.splash) to your App.java file.将 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");
}

Graeme, are you building localy in eclipse? Graeme,你是在 eclipse 中构建 localy 吗?

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——不适用于您的本地开发。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM