Unable to reference a Library project - Android
<p>Well, I wanted to create a Library project from my existing sources so that it would help me re-use code for the paid app that I have in mind. When I saw the <a href="http://developer.android.com/guide/developing/projects/projects-eclipse.html" rel="nofollow">developer guide</a> on how this was to be done, I thought it was very simple.</p>

<p>Just mark the project as a Library project and it should be converted to one.</p>

<p>But when I tried referencing one of the base classes in an application, the app force closes with the following exceptions</p>

<blockquote>
  <p>02-04 21:50:06.765: E/AndroidRuntime(699): java.lang.NoClassDefFoundError: in.my.package.name.R$layout</p>
</blockquote>

<p>Let me give you some more info. I have referenced the Library project in the application and have also included the manifest entries with fully qualified activity names. I have a BaseActivity which has all the menu and re-usable code bits. The point where the above exception occurs is where I am trying to reference the layout file in this BaseActivity inside the library project.</p>

<blockquote>
  <p>setContentView(R.layout.apphome);</p>
</blockquote>

<p>What is it that I am missing or doing wrongly?</p>

<p>PS: I am just noticing that When I right click on my application and go to the android tab, there is a <strong>red cross</strong> instead of a <strong>green tick</strong> in the place where the library project is referenced. But there are no visible errors on the console or in the code of the project.</p>
