Resource merging in Instant Apps features modules

2019-03-20 21:07发布

In an Instant App feature module, I'm importing an aar (using "api" statement from a maven repository) which contains an activity declaration in its manifest and a "style" resource used in this declaration. The resulting manifest merging fails because the style resource is not found in the base feature project. It seems resources from imported aar in features modules are not included in the base feature module.

Since the plugin is still in alpha mode I'm not sure if I'm doing something wrong, if it is a bug or the expected behaviour.

Any advice on this?

1条回答
放我归山
2楼-- · 2019-03-20 21:43

Actually it seems that for now this is the intended behaviour. They now affirmn in the official FAQ: "In addition, all the resources referenced by the manifest of a feature module must be present in the base feature module. "

In case such as the one described it that can be troublesome because either you are forced to include the library providing the resources in the base module or at least redeclare in the base module (trough overriding), resources used in the manifest.

Source: https://developer.android.com/topic/instant-apps/faqs.html

查看更多
登录 后发表回答