Cordova Change AndroidManifest using Config.xml file

后端 未结 3 1034
半阙折子戏
半阙折子戏 2021-02-18 13:04

I am in need to add some tags to the AndroidManifest.xml file which is found under

platforms\\android\\AndroidManifest.xml

As I h

相关标签:
3条回答
  • 2021-02-18 13:50

    in my case, nothing was working 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>
    
    0 讨论(0)
  • 2021-02-18 13:56

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

    <edit-config file="AndroidManifest.xml" target="/manifest/uses-sdk" mode="merge">
        <uses-sdk android:minSdkVersion="16" android:maxSdkVersion="23" />
    </edit-config>
    
    0 讨论(0)
  • 2021-02-18 14:01

    There is a plugin for that:

    https://www.npmjs.com/package/cordova-custom-config

    By using this plugin you can modify all the platform specific things (iOS and Android) and you get a clean cordova envirement.

    0 讨论(0)
提交回复
热议问题