使用Multiplex执行时出错

时间:2017-04-28 21:41:40

标签: android google-maps firebase android-multidex

我正在使用firebase和google地图,当我添加google play服务时,使用multidexing编译应用程序:

现在这个编译和构建但是当执行show me:

16465-16465/com.procibernetica.moca E/AndroidRuntime: FATAL EXCEPTION: main
                                                                         Process: com.procibernetica.moca, PID: 16465
                                                                         java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.procibernetica.moca-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.procibernetica.moca-1, /vendor/lib, /system/lib, /system/lib/arm]]
                                                                             at android.app.ActivityThread.installProvider(ActivityThread.java:4833)
                                                                             at android.app.ActivityThread.installContentProviders(ActivityThread.java:4425)
                                                                             at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4365)
                                                                             at android.app.ActivityThread.access$1500(ActivityThread.java:138)
                                                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1296)
                                                                             at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                             at android.os.Looper.loop(Looper.java:149)
                                                                             at android.app.ActivityThread.main(ActivityThread.java:5061)
                                                                             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:787)
                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:603)
                                                                             at dalvik.system.NativeStart.main(Native Method)

我的傻瓜:

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.android.application'
android {
    compileSdkVersion 25
    buildToolsVersion '25.0.0'
    defaultConfig {
        applicationId "com.procibernetica.moca"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled = true
    }
   buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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'
    })

    //Google Cloud Messaging
    //Google Location, Activity Recognition, and Places
    //Google Mobile Ads (Optional)
    compile project(':moca-sdk-android-1.9.6')
    compile files('libs/tooleap-sdk-0.9.8.jar')
   // compile 'com.android.support:multidex:1.0.1'
    compile 'org.msgpack:msgpack:0.6.11'
    compile 'com.google.android.gms:play-services-gcm:9.2.0'
    compile 'com.google.android.gms:play-services-location:9.2.0'
    compile 'com.google.android.gms:play-services-ads:9.2.0'
    compile 'com.google.android.gms:play-services-maps:9.2.0'
    compile 'com.google.maps.android:android-maps-utils:0.4.+'
    compile 'com.google.firebase:firebase-database:9.2.0'
    compile 'com.google.android.gms:play-services:9.2.0'
    compile 'com.google.gms:google-services:3.0.0'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.google.firebase:firebase-auth:9.2.0'
    compile 'com.google.android.gms:play-services-auth:9.2.0'
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
    compile 'com.github.satyan:sugar:1.5'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:design:25.3.1'
}

我不知道为什么编译,但不收取所有sdks,我尝试添加

  

编译'com.android.support:multidex:1.0.1'

但结果却一样。

0 个答案:

没有答案