title: java.lang.NoClassDefFoundError: com.applibrary.R$layout
body: <p>Edit : Solved. How? Nut sure, but an user commented on my questions about errors in res-folder could make this happen. Didn't have errors in this folder, but a warning about an image that was not used. Removed this and other possible causes to warnings, recompiled and uploaded to Play. It works...</p>
  
  <p>--</p>
  
  <p>I've made an app that works fine running on both the emulator and device. If I export then app and the install the app on my device, it works. But when I've published it on Play and install it from there, I get this error:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: com.applibrary.R$layout
  at com.applibrary.ANEivActivity.onCreate(ANEivActivity.java:179)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
  at android.app.ActivityThread.access$2300(ActivityThread.java:135)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:144)
  at android.app.ActivityThread.main(ActivityThread.java:4937)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>This error just occured during a bugfix that was related to something else than R or any thing else that remotely can have done anything with the project setup. Seems like applibrary is lost when published on Play(?).</p>
  
  <p>My app uses a library called applibrary and most of the code, including java, layout, string, is located in this library. </p>
  
  <p>How come this error only occurs when the app is downloaded from Play and not run as mentioned on emulator and device?</p>
  
  <p>I've tried 'Fix Project Properties', 'Clean'.</p>