I have a normal Android project to which another AndroidLibrary project is connected with an additional module. In AndroidLibrary in the res / layout folder there is an .xml with layout and I want to get this resource from the main project module. I try to get through the resource file, but I simply don’t have this file and I’m offering to create it, i.e. I can’t get through to either the main module or the other.

I try to do this:

 com.myLibrary.R.layout.list_item 

gives an error message:

Error: (41, 100) error: package com.myLibrary.R does not exist

  • R.layout.list_item so tried? - katso
  • Highlights in red and offers to import from the main module package. - Kirill Stoianov
  • к которому дополнительным модулем подключен другой AndroidLibrary проект - how is it connected? - ermak0ff 2:22 pm
  • via Project Structure / Modules / Dependencies / add module dependencie (Java classes see resources for some reason do not) - Kirill Stoianov
  • 3
    m. Build -> MakeModule , so that the R -class is generated - ermak0ff

1 answer 1

Make a module to generate R.class

Build -> MakeModule