ClassNotFoundException - com.google.android.gms.chimera.GmsModuleInitializer

时间:2017-03-07 12:30:00

标签: android android-gradle build.gradle

在添加Google MapView功能后,此异常提升,在启动应用程序后,Exception立即抛出,但应用程序没有崩溃,不知道是什么导致它。

  

03-07 03:17:42.514 2146-2146 / com.google.android.gms E / ChimeraModuleLdr:模块com.google.android.play.games的初始化失败                                                                           java.lang.ClassNotFoundException:没找到类" com.google.android.gms.chimera.GmsModuleInitializer" on path:DexPathList [[zip file" /system/app/PlayGames.apk"],nativeLibraryDirectories = [/ vendor / lib,/ system / lib]]                                                                               在dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)                                                                               at java.lang.ClassLoader.loadClass(ClassLoader.java:497)                                                                               在bxd.loadClass(:com.google.android.gms:34)                                                                               at java.lang.ClassLoader.loadClass(ClassLoader.java:457)                                                                               在com.google.android.gms.chimera.container.GmsModuleApi.onApkLoaded(:com.google.android.gms:91)                                                                               在bxh.a(:com.google.android.gms:146)                                                                               在com.google.android.chimera.container.ConfigurationManager.a(:com.google.android.gms:655)                                                                               在com.google.android.chimera.container.ConfigurationManager.a(:com.google.android.gms:485)                                                                               在bvh.a(:com.google.android.gms:1106)                                                                               在bvh.onReceive(:com.google.android.gms:229)                                                                               在hjw.onReceive(:com.google.android.gms:62)                                                                               在android.app.ActivityThread.handleReceiver(ActivityThread.java:2419)                                                                               在android.app.ActivityThread.access $ 1700(ActivityThread.java:135)                                                                               在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1272)                                                                               在android.os.Handler.dispatchMessage(Handler.java:102)                                                                               在android.os.Looper.loop(Looper.java:136)                                                                               在android.app.ActivityThread.main(ActivityThread.java:5017)                                                                               at java.lang.reflect.Method.invokeNative(Native Method)                                                                               在java.lang.reflect.Method.invoke(Method.java:515)                                                                               在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:779)                                                                               在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)                                                                               at dalvik.system.NativeStart.main(Native Method)                                                                               压制:java.io.IOException:无法打开DEX文件                                                                               at dalvik.system.DexFile.openDexFileNative(Native Method)                                                                               在dalvik.system.DexFile.openDexFile(DexFile.java:296)                                                                               在dalvik.system.DexFile。(DexFile.java:80)                                                                               在dalvik.system.DexFile。(DexFile.java:59)                                                                               在dalvik.system.DexPathList.loadDexFile(DexPathList.java:263)                                                                               在dalvik.system.DexPathList.makeDexElements(DexPathList.java:230)                                                                               在dalvik.system.DexPathList。(DexPathList.java:112)                                                                               在dalvik.system.BaseDexClassLoader。(BaseDexClassLoader.java:48)                                                                               在dalvik.system.PathClassLoader。(PathClassLoader.java:65)                                                                               at bxd。(:com.google.android.gms:16)                                                                               在bwi.a(:com.google.android.gms:89)                                                                               在bxh.a(:com.google.android.gms:124)                                                                                       ......还有16个

我的傻瓜:

apply plugin: 'com.android.application'
android {
    // Skip some version control stuffs
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    defaultConfig {
        applicationId "com.hoelee.obriensdelivery"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode code
        versionName nameFull
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            applicationIdSuffix ".debug"
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        disable "ResourceType"
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:design:25.2.0'
    testCompile 'junit:junit:4.12'
    compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
    compile 'com.hrules:horizontalnumberpicker:1.1.1'
    compile 'com.baoyz.pullrefreshlayout:library:1.2.0'
    compile 'com.github.clans:fab:1.6.4'
    compile 'com.sdsmdg.tastytoast:tastytoast:0.1.1'
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
    compile 'ch.acra:acra:4.9.0'
    compile ('com.google.android.gms:play-services-maps:10.2.0'){
        exclude group: 'com.google.android.gms', module: 'play-services-ads'
    }
    compile ('com.google.android.gms:play-services-places:10.2.0'){
        exclude group: 'com.google.android.gms', module: 'play-services-ads'
    }
}

我没有调用GmsModuleInitializer类,它是一些依赖使用它吗? 这个应用程序不是游戏,我应该添加Google Play移动服务吗? 感谢。

0 个答案:

没有答案