Last active
August 25, 2017 07:03
-
-
Save kobeumut/cc10c2644df86b8e484ddf873b26bfcc to your computer and use it in GitHub Desktop.
MultiDex Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
... | |
defaultConfig { | |
multiDexEnabled true | |
... | |
} | |
} | |
dependencies { | |
// add dependency | |
compile 'com.android.support:multidex:1.0.2' | |
} | |
// ADD THIS AT THE BOTTOM | |
apply plugin: 'com.google.gms.google-services' | |
// | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
if (BuildConfig.DEBUG) { | |
Timber.plant(new Timber.DebugTree()); | |
} else { | |
Timber.plant(new CrashSender()); | |
} | |
} | |
//Add MultiDex install in attachBaseContext | |
@Override | |
protected void attachBaseContext(Context context) { | |
super.attachBaseContext(context); | |
MultiDex.install(this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment