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

前端 未结 3 1657
孤城傲影
孤城傲影 2020-11-27 19:10

Receiving this error on Android 4.4 device when starting my app. App immediately crashes. However I don\'t have this error on Android 5.1 device. Any clue?

3条回答
  •  孤街浪徒
    2020-11-27 19:39

    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."

提交回复
热议问题