Removing AndroidManifest element with gradle product flavors

前端 未结 3 1981
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-04 10:01

I\'m setting up an Android gradle project with a few product flavors. I would like to have the

3条回答
  •  有刺的猬
    2021-01-04 10:38

    I know this is old but now there is a new attribute called tools:node="remove" that enables you to remove a tag from the Manifest.

    Declare the header of your manifest as follows:

    
    

    Also you have to add your tag like this:

    
    

    I hope this helps others.

    Source: HERE

    Also Android documentation: HERE

    EDIT:

    Edited the answer to match new API changes. Thanks to Martin L. for his comment

提交回复
热议问题