CLI build Config.xml phonegap 3.3.0 ignores name and description

戏子无情 提交于 2019-12-12 13:16:47

问题


In the config file that is the blue print for all platforms, i Have added this:

<name>My app name</name>
<description>
    My app description.
</description>
<author email="my email" href="my url">
    Same name
</author>

But after running

phonegap run android

In the config.xml in the folder platforms/android/res/xml it gives:

on top of the file:

<name>Hello Cordova</name>
<description>
    A sample Apache Cordova application that responds to the deviceready event.
</description>

than the feature list

and than (before the preferences):

<name>My app name</name>
<description>
    My app description.
</description>
<author email="my email" href="my url">
    Same name
</author>
<feature name="http://api.phonegap.com/1.0/device" />

So it does copy the name etc in the config file... but somehow leaves the example name in the config file.

Edit 16-jan-2014

Although this question: Config.xml ignored in creation process is about and the html reference... it look's like there is still a lot work to do for the command line option that creates the platform folders... so my attempt to make evrything work (both ios and android) from 1 www folder looks like a mission impossible right now.

For developing this is a mess... some things (plugins) you have to do from command line... and do a build to get the proper config... but than all the mistakes you have recovered manually... will be overwritten again!

Edit 12-feb-2014

by the way, in my total quest in this phonegap new way of living... I have another very long question and asnwering: Upgrade to phonegap 3.3.0

Edit 5 may 2014

Due to all problems in phonegap, the benefits of the principle behind phonegap has gone for me. (I still believe in potential phonegap can be the solution... but for now it's to premature). So I Am sorry i have to leave the phonegap path. I let this answer open for the ones still searching for answers... but do not expect any answers or the 'acceptance of the right answer' from me.


回答1:


The answer of christianmenkens on this question: Cordova Android Plugin: config.xml overwritten by cordova prepare? gives some more insight in my problem here...

He describes 3 config.xml files. What I call the 'blue print' config.xml file, is his number 1 file. (the only one that should be edited according to the docs of phonegap....

1) myproject/www/config.xml

but he mentions 2 other config.xml:

2) myproject/platforms/android/res/xml/config.xml

3) myproject/platforms/android/assets/www/config.xml

it looks as if the name and description problem I describe above only appears in file nr. 2 In file nr. 3 everything seems ok... well the name and description part.... because all other things I expect to go automatically is still very messy.

My onlu conclusing: a lot of bugs still in this whole procedure...




回答2:


I just see this blog: http://devgirl.org/2014/02/10/3-cordova-cli-changes/ Might have to look at this new Cordova upgrade




回答3:


try moving your config.xml from the www folder to the root folder of the project, that worked for me.

New files structure will be.

merges/
platforms/
www/
config.xml


来源:https://stackoverflow.com/questions/20953653/cli-build-config-xml-phonegap-3-3-0-ignores-name-and-description

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!