title: Android dependent library can not access R class of dependency library
body: <p>In android studio I have two library projects A and B. B is trying to access a String resource value that's in project A's strings.xml The code used looks like this</p>
  
  <pre><code>context.getString(com.myproject.libraryA.R.string.prefname);
  </code></pre>
  
  <p>Error received is package name com.myproject.libraryA.R does not exist.</p>
  
  <p>B is using A as dependency module.</p>
  
  <p>Why this is failing or wrong way to do it ?</p>
  
  <p>Thanks</p>