Enable Multidex through build.gradle
of your app module
multiDexEnabled true
Same as below –
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.xx.xxx"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true //Add this
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
Then follow below steps –
- From the
Build
menu -> press theClean Project
button. - When task completed, press the
Rebuild Project
button from theBuild
menu. - From menu
File -> Invalidate cashes / Restart
compile
is now deprecated so it’s better to use implementation
or api