无法将请求的类放入单个dex文件中。尝试提供main-dex列表。 #方法:87928> 65536

时间:2019-10-05 10:56:15

标签: android gradle

这主要是什么以及如何纠正错误

  

无法在单个dex文件中容纳请求的类。尝试提供一个   main-dex列表。

     

方法:87928> 65536

这是我的礼物

apply plugin: 'com.android.application'
android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.apoce.app.admin"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:customtabs:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:animated-vector-drawable:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.google.firebase:firebase-auth:16.0.3'
    implementation 'com.google.firebase:firebase-database:16.0.2'
    implementation 'com.google.firebase:firebase-core:16.0.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
    implementation 'com.facebook.android:facebook-login:[4,5)'
    implementation 'com.firebaseui:firebase-ui:4.1.0'
    implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.36.1'
}
apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:0)

我通过将这种依赖性添加到gardle应用程序中来解决此错误

implementation "androidx.multidex:multidex:2.0.1"

以及此配置multiDexEnabled truedefaultConfig