0

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

jeprubio
  • 17,312
  • 5
  • 45
  • 56
Syxs
  • 158
  • 6
  • `im forced to use multidex` why? By the by show logcat – IntelliJ Amiya Mar 24 '20 at 14:07
  • Im using SygicSDK embedded integration, so to avoid manifest merge errors and because : https://www.sygic.com/developers/professional-navigation-sdk/android/getting-started/embedded-integration-using-android-studio – Syxs Mar 24 '20 at 14:35

0 Answers0