androidandroid-studioandroid-gradle-pluginandroid-sdk-toolsandroid-multidex

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


I updated from Android Studio 2.2.3 to Android Studio 2.3 yesterday, and I ran into the following two problems:

I am unable to resolve this error. I have buildToolsVersion '25.0.2', and my project compiled and ran properly before upgrading to Android Studio 2.3. Can anyone help me with this problem?


Solution

  • 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.