inline Resource-id clashes with library modules

Originally published on May 1st, 2020 (Last updated on May 1st, 2020)

When includ­ing an Android library as a mod­ule in Intel­liJ (for exam­ple the card­view from the sup­port-library), the fol­low­ing error might occur:

Resource id [hex-id] is not of type [expected-type] (instead [actual-type])

along with this excep­tion at runtime:

android.view.InflateException: Binary XML file line #[line]: Error inflating class [class]

To fix this make sure that the mod­ule has the Library module-check­box on the top-left in Project Structure -> Modules -> [Expand Module Name] -> Android is ticked!


No com­ment sec­tion here 😄

You can reach me over at @knuth_dev or send me an Email.