title: Creating Android Library Project: R.id
body: <p>I'm creating an Android Library Project, and I have a class in which the programmer has to pass an <code>R.layout.some_layout</code>, to the instance, in which some view should have an <code>@+id/text</code></p>
  
  <p>So the idea is that I create an XML layout file, I add a view with an "text" as its ID, and after I instantiate the class I use <code>object.setLayout(R.layout.some_layout);</code></p>
  
  <p>In the definition of the class there is something like this:</p>
  
  <pre><code>public void setLayout(int layoutId) {
      View view = findViewById(R.id.text); // error here cause of the R.id
  }
  </code></pre>
  
  <p>The problem is that since it's a library project, my <code>R.java</code> doesn't have an <code>R.id</code>, so it marks an error on that line. Any ideas of how to do this?</p>