title: Firebase database no class found error (NoClassDefFoundError)
body: <p>I have large project that uses multiple sub-modules, I have added the firebase database dependency to one of my modules that is included in my project. When testing locally where modules are included as open projects everything works fine, when building using closed modules (my modules come as <code>aar</code> files) I get the following error:</p>
  
  <blockquote>
    <p>java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/database/FirebaseDatabase;</p>
  </blockquote>
  
  <p>I have include the following dependency in my module:</p>
  
  <pre><code>implementation 'com.google.firebase:firebase-database:11.0.4'
  </code></pre>
  
  <p>I have tried adding to proguard the following rule but it's not helping:</p>
  
  <pre><code>-keep public class com.google.firebase.database.** {
      *;
  }
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>After doing a lot of research, I think this issue is related to having <code>multiDex</code> enabled. </p>
  
  <pre><code>ClassNotFoundException: Didn't find class "com.google.firebase.database.FirebaseDatabase" on path: DexPathList
  </code></pre>
  
  <p>Any ideas how to solve this?</p>