title: Dagger code giving NoClassDefFoundError in Android instrumentation tests, but works in the normal application
body: <p>I am using Dagger in an Android application.
  It is working in the Application but when I run the instrumentation tests, I am getting a NoClassDefFoundError.</p>
  
  <p>I am using Gradle and Espresso. This is happening WITHOUT progaurd.</p>
  
  <p>This is strange since the "Module$$ModuleAdapter" getting loaded , but "Module$$ModuleAdapter$EndpointProvidesAdapter" is not.</p>
  
  <p>I pulled the APK back off the device and used dexdump to verify that the class is indeed in the APK, "Module$$ModuleAdapter$EndpointProvidesAdapter".</p>
  
  <p>Any ideas on what might be causing this? </p>
  
  <pre><code> java.lang.NoClassDefFoundError: Module$$ModuleAdapter$EndpointProvidesAdapter
              at ...Module$$ModuleAdapter.getBindings(MslModule$$ModuleAdapter.java:33)
              at ...Module$$ModuleAdapter.getBindings(MslModule$$ModuleAdapter.java:13)
              at dagger.ObjectGraph$DaggerObjectGraph.makeGraph(ObjectGraph.java:185)
              at dagger.ObjectGraph$DaggerObjectGraph.access$000(ObjectGraph.java:138)
              at dagger.ObjectGraph.create(ObjectGraph.java:129)
              at ...Application.onCreate(...Application.java:21)
              at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
              at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
              at android.app.ActivityThread.access$1500(ActivityThread.java:135)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:136)
              at android.app.ActivityThread.main(ActivityThread.java:5017)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: java.lang.ClassNotFoundException: Didn't find class ...Module$$ModuleAdapter$MslEndpointProvidesAdapter" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/....test-1.apk", zip file "/data/app/...-2.apk"],nativeLibraryDirectories=[/data/app-lib/....test-1, /data/app-lib/...-2, /vendor/lib, /system/lib]]
              at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
              at ...Module$$ModuleAdapter.getBindings(MslModule$$ModuleAdapter.java:33)
              at ...Module$$ModuleAdapter.getBindings(MslModule$$ModuleAdapter.java:13)
              at dagger.ObjectGraph$DaggerObjectGraph.makeGraph(ObjectGraph.java:185)
              at dagger.ObjectGraph$DaggerObjectGraph.access$000(ObjectGraph.java:138)
              at dagger.ObjectGraph.create(ObjectGraph.java:129)
              at ...eApplication.onCreate(...Application.java:21)
              at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
              at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
              at android.app.ActivityThread.access$1500(ActivityThread.java:135)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:136)
              at android.app.ActivityThread.main(ActivityThread.java:5017)
  </code></pre>