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
Buildmenu -> press theClean Projectbutton. - When task completed, press the
Rebuild Projectbutton from theBuildmenu. - From menu
File -> Invalidate cashes / Restart
compile is now deprecated so it’s better to use implementation or api