title: Getting Error : "NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl" when running Espresso Instrumentation Test
body: <p>I'm running Espresso Tests in a multi-module project with modules:-
  :app, :core.  I have added following code snippet in both the modules:-</p>
  
  <pre><code>dataBinding {
      enabled = true
  }
  </code></pre>
  
  <p>The app is running fine. But when I run Espresso tests (in :core module), it giving me following error:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;
  at androidx.databinding.DataBindingUtil.&lt;clinit&gt;(DataBindingUtil.java:32)
  at androidx.databinding.DataBindingUtil.getDefaultComponent(DataBindingUtil.java:65)
  at com.example.core.databinding.MyProductFragmentBinding.inflate(MyProductFragmentBinding.java:73)
  at com.example.core.screens.collection.MyProductFragment.onCreateView(MyProductFragment.kt:29)
  at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2544)
  at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:884)
  at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1235)
  at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1301)
  at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:710)
  at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2071)
  at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1861)
  at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1816)
  at androidx.fragment.app.FragmentManagerImpl.execSingleAction(FragmentManagerImpl.java:1693)
  at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:554)
  at androidx.fragment.app.testing.FragmentScenario$1.perform(FragmentScenario.java:307)
  at androidx.fragment.app.testing.FragmentScenario$1.perform(FragmentScenario.java:286)
  at androidx.test.core.app.ActivityScenario.lambda$onActivity$1$ActivityScenario(ActivityScenario.java:534)
  at androidx.test.core.app.ActivityScenario$$Lambda$0.run(Unknown Source:4)
  at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:2203)
  at android.os.Handler.handleCallback(Handler.java:878)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:209)
  at android.app.ActivityThread.main(ActivityThread.java:7046)
  at java.lang.reflect.Method.invoke(Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:486)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
  Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.databinding.DataBinderMapperImpl" on path: DexPathList[[zip file "/data/app/com.caastle.platform.core.test-QvTkSvEOT-JWp8dhTG8kIg==/base.apk"],nativeLibraryDirectories=[/data/app/com.caastle.platform.core.test-QvTkSvEOT-JWp8dhTG8kIg==/lib/x86, /system/lib, /system/product/lib]]
  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:195)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
  ... 26 more
  
  Test running failed: Instrumentation run failed due to 'Process crashed.'
  </code></pre>