title: Check if APK has been built properly
body: <p>I recently had an issue with an Android application and I can't figure out what happened.
  I was developing and testing my app via Eclipse and everything worked fine.
  Then it was time to publish it on the PlayStyore (the version 1.0 was already published a few hours ago).
  So I cleaned my workspace, and signed the APK via "Android Tools => Export signed application package" and uploaded the .apk on GooglePlay.
  The uploading process completed without any issues.
  When the app (1.0.1) got published on the PlayStore, I tried to download it and install it on my phone. It downloaded fine, but the app CRASHED after 1 second, not even the first screen appeared. (but it worked fine with my device connected to Eclipse, and I also sent the apk by email on my phone and installed it from there, no issue)</p>
  
  <p>And everyone who installed the new version of my app couldn't launch it...</p>
  
  <p>Here is the log I can see on GooglePlay</p>
  
  <blockquote>
    <p>java.lang.RuntimeException: Unable to instantiate application
    be.example.ex.Ex: java.lang.ClassNotFoundException: Didn't find class
    "be.example.ex.Ex" on path: /data/app/be.example.ex-2.apk at
    android.app.LoadedApk.makeApplication(LoadedApk.java:509) at
    android.app.ActivityThread.handleBindApplication(ActivityThread.java:4657)
    at android.app.ActivityThread.access$1400(ActivityThread.java:159) at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
    at android.os.Handler.dispatchMessage(Handler.java:99) at
    android.os.Looper.loop(Looper.java:176) at
    android.app.ActivityThread.main(ActivityThread.java:5419) at
    java.lang.reflect.Method.invokeNative(Native Method) at
    java.lang.reflect.Method.invoke(Method.java:525) at
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) at
    dalvik.system.NativeStart.main(Native Method) Caused by:
    java.lang.ClassNotFoundException: Didn't find class "be.example.ex.Ex"
    on path: /data/app/be.example.ex-2.apk at
    dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:501) at
    java.lang.ClassLoader.loadClass(ClassLoader.java:461) at
    android.app.Instrumentation.newApplication(Instrumentation.java:992)
    at android.app.LoadedApk.makeApplication(LoadedApk.java:504) ... 11
    more</p>
  </blockquote>
  
  <p>So I read a few posts on SO, I cleaned my project (again), unlinked the libraries of my project, then linked them back again.
  I published the new APK, (1.0.2) and hopefully, everything worked fine, users could launch it after downloading it from PlayStore.</p>
  
  <p>Now I have an other version to publish and I just can't get into the same issue. More people downloaded the app now and I can't afford the app to crash on every user's phone.</p>
  
  <p>Is there a way to avoid the previous issue ? Maybe a tool to check if the apk has been built properly ? </p>
  
  <p>Note this is the first time I get this error and I already published a few apps without any issue. I'm gonna freak out now every time I release a new version, so if someone could give me an advice to make sure this never happen again, this would be great :)</p>
  
  <p>Thanks in advance !</p>