Separate manifest for instant app

后端 未结 2 762
北海茫月
北海茫月 2021-01-17 04:28

Can I use different manifests for instant app and a regular application?
In more detail, I need to specify different classes \"App\" in the \"android:name=App\"

2条回答
  •  鱼传尺愫
    2021-01-17 04:46

    There are a few ways to do this:

    If you must have two different manifests, then you will need to use tools:replace, example:

    Your installed-app module’s manifest:

    
    

    Your feature module’s manifest:

    
    

    When your installed-app is built, it will run with App, and when your instant-app is built, it will run with AppFeat. You can play with variations of this.

    But it would be easier if you use isInstantApp() to branch off, in just one Application implementation.

提交回复
热议问题