java.lang.NoClassDefFoundError: com.google.android.gms.internal.zzmp

For those who have already activated MultiDex and still get this exception, it's just a stupid Android Studio / Gradle issue.

Try cleaning project, toggling Instant Run in settings, and rebuilding the project.


needed to add this in class that extends Application:

 @Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}

EDIT: I noticed this answer is becoming more popular so please note my comment on the question:

"ATTENTION To anybody reading this though! The real problem was that I was using the ENTIRE google play services framework which was forcing me into multi dex. Avoid multi dex if you can because it slows down builds. Only bring in what you need from google play services. So instead of putting "compile 'com.google.android.gms:play-services:8.1.0'", put "compile 'com.google.android.gms:play-services-location:8.1.0'" for example."

Tags:

Android