Skip to content

Instantly share code, notes, and snippets.

@kobeumut
Last active August 25, 2017 07:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kobeumut/cc10c2644df86b8e484ddf873b26bfcc to your computer and use it in GitHub Desktop.
Save kobeumut/cc10c2644df86b8e484ddf873b26bfcc to your computer and use it in GitHub Desktop.
MultiDex Error
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