I need to switch my app to an multidexApp, but unfortunaly, some of my packages use my application context for saving files or other things .. But when i used android.support.multidex.MultiDexApplication
my context become null.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (App.context() == null) { // App.context() call getApplicationContext()
Log.e(TAG, " App context is null"); // -> Always null
}
...
}
Like this guy : Using MultiDexApplication causes applicationContext to become null , its the same problem (I think), I tryed to simply restart AS, create a new project and copy/paste some files... nothing works.
My application is really big so I can't rewrite lines of codes, and I'm forced to use multidex