[
https://issues.apache.org/jira/browse/CB-6993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038727#comment-14038727
]
Shai Schechter edited comment on CB-6993 at 6/20/14 12:13 PM:
--------------------------------------------------------------
I've tracked down the problem, and it is one that probably needs fixing.
It occurs when you have _some_ plugins using the first format
(*res/xml/config.xml*) such as the official plugins, but _other_ plugins using
the second format (*config.xml*), as advocated by the Plugin Development Guide
(http://docs.phonegap.com/en/3.5.0/guide_platforms_android_plugin.md.html#Android%20Plugins).
They get stored in *android.json* as separate paths, even though they are then
merged into the same config.xml file, causing the config.xml ones to override
the res/xml/config.xml ones.
I guess we need to either correct the Plugin Dev docs, or fix the android.json
parser to merge the two without overwriting, or both?
was (Author: shai126):
I've tracked down the problem, and it is one that probably needs fixing.
It occurs when you have _some_ plugins using the first format
(*res/xml/config.xml*) such as the official plugins, but _other_ plugins using
the second format (*config.xml*), as advocated by the Plugin Development Guide
(http://docs.phonegap.com/en/3.5.0/guide_platforms_android_plugin.md.html#Android%20Plugins).
They get stored in *android.json* as separate paths, even though they are then
merged into the same config.xml file, causing the config.xml ones to override
the res/xml/config.xml ones.
> Official and third-party plugins not installing correctly
> ---------------------------------------------------------
>
> Key: CB-6993
> URL: https://issues.apache.org/jira/browse/CB-6993
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, Plugin Dialogs, Plugins
> Affects Versions: 3.4.0
> Reporter: Shai Schechter
> Labels: config.xml, cordova-cli, plugins
>
> Most plugins I have come across (including, as one example, the official
> Dialogs plugin) include the line:
> {code}
> <config-file target="res/xml/config.xml" parent="/*">
> {code}
> in their *plugin.xml*.
> However, according to your plugin docs, the line should read:
> {code}
> <config-file target="config.xml" parent="/*">
> {code}
> I don't know if it's something wrong with my setup or what, but the latter is
> the only one that works for me. Any plugins using the former
> (res/xml/config.xml) do not have the corresponding *feature* tag added to any
> XML fileĀ - meaning the official plugins aren't working for me. Whereas, if I
> change it to the latter format, the feature tag is correctly copied into
> res/xml/config.xml when I run *cordova build*.
> Is this correct behaviour and the official plugins need updating? Or am I
> doing something wrong, and either syntax should work?
> Thanks very much.
> UPDATE: I am also pretty sure that the former syntax was working previously,
> on the same version (3.4.0-0.1.0) that I am using now. Which leads me to
> believe something must have changed on my end, although I have no idea what.
> Any ideas??
--
This message was sent by Atlassian JIRA
(v6.2#6252)