title: Android StackOverflow error on enabling MultiDex
body: <p>I'm getting the following exception after enabling MultiDex. My custom Application class is as follows. </p>
  
  <pre><code>public class PFApplication extends SugarApp {
     @Override
     public void onCreate() {
         super.onCreate();
         Branch.getAutoInstance(this);
     }
  
     @Override
     protected void attachBaseContext(Context base) {
         super.attachBaseContext(this);
         MultiDex.install(this);
     }
  
  }
  </code></pre>
  
  <p>And given below is the stacktrace. App crashes on launch.</p>
  
  <blockquote>
    <p>FATAL EXCEPTION: main
                                                                                    Process: com.riverviewcs.product.friend, PID: 26404
                                                                                    java.lang.StackOverflowError
                                                                                        at android.content.ContextWrapper.getPackageManager(ContextWrapper.java:100)
                                                                                                                                                                     ......</p>
  </blockquote>
  
  <p>Any idea why?</p>