Gradle: How to merge Android manifest files for different buildTypes which need the same Activity, but with different intent-filters

后端 未结 3 1279
野趣味
野趣味 2020-12-05 05:47

so I\'m trying to use gradle to create a separate buildType, but that buildType needs to use different characteristics for the same Activity. In this case, my splash activit

3条回答
  •  离开以前
    2020-12-05 06:16

    It's not possible to merge the intent-filter separately at the moment so I would recommend copying the whole node into

    src/buildtype1/AndroidManifest.xml
    

    and

    src/buildtype2/AndroidManifest.xml
    

    and it'll get merged automatically into the final manifest (of course you also want to remove it from the main manifest).

提交回复
热议问题