问题
I wrote an android phonegap 3 plugin that starts an activity (the activity is part of plugin) and uses a native android UI. Now I want to follow the plugin specification to be able to install the plugin using the CLI.
My plugin has resources in the xml files /res/values/attrs.xml, /res/values/colors.xml and /res/values/ids.xml
My issue is that those files are not created by the platform add android
command, so I can't use <config-file>
to patch them.
I don't want to use <source-file>
because I would like to avoid conflicts if I have to install other plugins also using those files.
Is there a proper way to update a file if it exists or create it if it doesn't?
来源:https://stackoverflow.com/questions/21002934/how-tell-plugman-that-i-want-to-update-a-file-that-may-not-be-present