本文介绍了某些设备出错 - 无法找到“com.google.android.gms.measurement.internal.zzz”类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Android自定义启动器。该应用程序在某些手机上运行完美,但不会在其他手机上启动。启动应用程序时,会发生以下错误。

I am working on an Android Custom Launcher. The application runs perfectly on some phones but do not start on others. On launching the application the following error occurs.

E/dalvikvm﹕ Could not find class 'com.google.android.gms.measurement.internal.zzz', referenced from method com.google.android.gms.measurement.internal.zzv.zzaL

E/AndroidRuntime﹕ FATAL EXCEPTION: main

java.lang.VerifyError: com/google/android/gms/measurement/internal/zzv
            at com.google.android.gms.measurement.AppMeasurementContentProvider.onCreate(Unknown Source)
            at android.content.ContentProvider.attachInfo(ContentProvider.java:1651)
            at android.content.ContentProvider.attachInfo(ContentProvider.java:1622)
            at android.app.ActivityThread.installProvider(ActivityThread.java:5016)
            at android.app.ActivityThread.installContentProviders(ActivityThread.java:4590)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4530)
            at android.app.ActivityThread.access$1500(ActivityThread.java:155)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1385)
            at android.os.Handler.dispatchMessage(Handler.java:110)
            at android.os.Looper.loop(Looper.java:193)
            at android.app.ActivityThread.main(ActivityThread.java:5300)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:830)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:646)
            at dalvik.system.NativeStart.main(Native Method)


推荐答案

因此经过大量搜索后我才知道这个问题是由于多重索引造成的。在某些手机上,多索引不起作用。可能是因为他们的Android版本。但是我通过介绍一个应用程序类来解决这个问题

So after a lot of searching i came to know that this problem was due to the multidexing. On some phones multidexing don't work. May be due to their Android Version. However i fixed this by introductng an application class

public class MyApplication extends Application {

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

在清单中我输入了应用程序标签中的名称:

and in menifest i entered the name in application tag like:

<application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/xxxxxx"
        android:label="@string/app_name"
        android:manageSpaceActivity="xxxxxxxxxx"
        android:theme="@style/AppTheme" >

这篇关于某些设备出错 - 无法找到“com.google.android.gms.measurement.internal.zzz”类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 20:58