5

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?

gbaccetta
  • 4,449
  • 2
  • 20
  • 30

1 Answers1

5

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

gbaccetta
  • 4,449
  • 2
  • 20
  • 30
  • This is fine for AndroidManifest file, but not for the code level. But I am having another problem actually. The resources in the feature module are not found when I am trying to access in it is own module, but I move the resources into the base module, then they are available everywhere. – X-HuMan Jul 06 '17 at 09:50
  • That sucks... Sth. like `@myFeature:string/someString` would be great. Similar to the access of android system resources – Vall0n Feb 28 '19 at 15:59