Getting "package android.support.multidex does not exist" after upgrading to Android Studio 2.3

I have passed the building. my solution is that adding explicit dependencies in build.gradle. compile 'com.android.support:multidex:1.0.1'


The solution to this problem is to add the following:

dependencies {
  implementation 'com.android.support:multidex:1.0.3'
}

in your build.gradle file.

This was not required prior to Gradle 3.3. This problem occurs only for apps that support Android versions below Lollipop (API level 21).

References:

1. Multidex support prior to Android 5.0.


Replace
import android.support.multidex.MultiDexApplication;
with
import androidx.multidex.MultiDexApplication;