1

With reference to Sample project available

We have a base module and a feature module

From the feature module we do setContentView with a layout located in the base module. Directly afterwards we manually inflate a layout (layout_a.xml) inside the base layout (see GoodbyeActivity.java in bye feature) Inside this layout_a.xml we have a simple button with a background resource which is only available in the feature module. App doesn't run, runtime crash. It compiles without errors. It seems that the whole idea of splitting up resources is broken. Or am i doing something wrong here? This error is happening also with anything pointing to feature resources. <include> statements, strings, dimensions etc. Very annoying that you don't see any build errors as well.

To reproduce this error clone the repo in the link above. Its a clone of the android instant app demo repository. Open the hello-feature-module en run the instant app with url "http://hello-feature.instantappsample.com/goodbye/example" In bye feature see the GoodbyeActivity and layout_a.xml in the res folder.

If you remove line 29 in the layout_a.xml file the app runs fine.

1 Answer 1

3

With reference to Google issue tracker, it has been fixed with Android SDK Built-Tools to 27.0.2

Please update your Android SDK Built-Tools to 27.0.2 And ensure you are on Android Studio 3.0.1 or newer.

If any issue persists, please report at Google issue tracker they will re-open to examine.

Not the answer you're looking for? Browse other questions tagged or ask your own question.