Cordoba Modify AndroidManifest with the Config.xml File

I need to add some tags to a file AndroidManifest.xmlthat is in

platforms\android\AndroidManifest.xml

As I already read, the file is AndroidManifest.xmlgenerated on the fly, and editing it is not recommended.

So is there a plugin that I can use that will change the file AndroidManifest.xmlfor me with the values ​​that I config.xmlfile config.xml?

+14
source share
3 answers

Since the recent release of cordova@6.4.0, you can use the tag <edit-config>in config.xml to do this without requiring a third-party plugin. For instance:

<edit-config file="AndroidManifest.xml" target="/manifest/uses-sdk" mode="merge">
    <uses-sdk android:minSdkVersion="16" android:maxSdkVersion="23" />
</edit-config>
+22
source

nothing worked in my case, but this one I came up with:

<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest">
            <application android:hardwareAccelerated="false" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" />
        </edit-config>
+1
source

Source: https://habr.com/ru/post/1659968/


All Articles