I'm getting the following exception after enabling MultiDex. My custom Application class is as follows.
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);
}
}
And given below is the stacktrace. App crashes on launch.
FATAL EXCEPTION: main Process: com.riverviewcs.product.friend, PID: 26404 java.lang.StackOverflowError at android.content.ContextWrapper.getPackageManager(ContextWrapper.java:100) ......
Any idea why?
You are getting this error
StackOverflowError
Thrown when a stack overflow occurs because an application recurses too deeply.
You should rectify your
attachBaseContext
section .FYI
Call
base
instead ofthis