title: DexIndexOverflowException: Cannot merge new index 65772 into a non-jumbo instruction!: Jumbo Mode? and/or Multi-Dex? What is behind the scene?
body: <p>I have tried to set jumboMode in gradle for my project, it seems able to solve the following DexIndexOverflowException:</p>
  
  <blockquote>
    <p>com.android.dex.DexException: Cannot merge new index 65536 into a non-jumbo instruction!</p>
    
    <p>DexIndexOverflowException: Cannot merge new index 65772 into a non-jumbo instruction!</p>
  </blockquote>
  
  <p>1) What is jumboMode option actually does behind the scene?</p>
  
  <pre><code>android {
      ...
      dexOptions {
          jumboMode true
      }
  
  }
  </code></pre>
  
  <p>2) I also notice that enabling multi-dex can solve the same problem as well, what is the right choice between these two approaches?</p>
  
  <pre><code>android {
      ...
      defaultConfig {
          ...
          multiDexEnabled true
      }
  }
  </code></pre>