title: unable to instantiate application - ClassNotFoundException
body: <p><strong>EDIT: This problem has not already been resolved in the other suggested SO question</strong></p>
  
  <p>I had a fully working app on the market for over a year, with very few crash reports. Then recently I changed my app into a library, so that it could be included within multiple different "wrapper" projects. This was so that I could easily make different version - free, paid, non-google markets, with/without in-app purchasing etc etc.</p>
  
  <p>The new "library+wrapper" app appeared to work fine. I could run it multiple times, without error. But then a day later (when presumably the OS had closed some or all of the app's activities) I tried to run it and it reported</p>
  
  <pre><code>Unable to instantiate application com.mycompany.mygamelibrary.MyGameApplicationClass: java.lang.ClassNotFoundException: com.mycompany.mygamelibrary.MyGameApplicationClass
  </code></pre>
  
  <p>The class it failed to find is the first class that runs when the program starts up, MyGameApplicationClass - which extends <code>Application</code>. This class is part of the library.</p>
  
  <p>I suspect something goofy in one of the two manifest files.</p>
  
  <p>The manifest of the <strong>wrapper</strong> project contains the lines...</p>
  
  <pre><code>&lt;application android:icon="@drawable/mygame_icon"
      android:screenOrientation="portrait" android:label="My Game Name"
      android:name="com.mycompany.mygamelibrary.MyGameApplicationClass"&gt;
  </code></pre>
  
  <p>Any ideas what could have gone wrong?</p>
  
  <p><strong>EDIT:</strong> The library was referenced "the correct way" as defined by yorkw's answer to <a href="https://stackoverflow.com/questions/10866431/android-activity-classnotfoundexception-tried-everything/10965393#10965393">this SO question</a>.</p>
  
  <p><strong>EDIT:</strong> I can not repeat the crash at the moment :-( I don't know what it is the OS does when the app is not used for a day or two.</p>