Как решить несколько файлов dex определить Lcom / getkeepsafe / relinker - PullRequest
0 голосов
/ 18 июня 2019

Я успешно заполнил приложение, я успешно "загрузил в Google Play", но во второй раз, когда "генерировать знак apk" появилась такая проблема:

Multiple dex files define Lcom / getkeepsafe / relinker / elf / Elf $ SectionHeader;

, хотя я никогда не изменялИсходный код, он только изменил «код версии».

Я попробовал следующие шаги:

  1. удалить .gradle
  2. пересобрать приложение с нуля
  3. использовать другой компьютер

, но результаты остаются прежними.

apply plugin: 'com.android.application'
apply plugin: 'realm-android'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.3'
    defaultConfig {
        applicationId 'com.palopo.robotic'
        minSdkVersion 17
        targetSdkVersion 26
        versionCode 13
        versionName '1.0.3'
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        dexOptions {
            javaMaxHeapSize '4g'
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}
/* IMPORTANT :
 * Be careful when update dependencies, different version library may caused error */
dependencies {
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.+'
}
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'
        exclude group: 'com.google.code.findbugs'
    })
    compile('com.mikepenz:fastadapter:2.0.0@aar') {
        transitive = true
    }
    compile 'com.afollestad.material-dialogs:core:0.9.0.0'
    compile 'com.mikepenz:iconics-core:2.8.1@aar'
    compile 'com.mikepenz:fontawesome-typeface:4.6.0.2@aar'

    compile('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
        exclude module: 'support-v4'
    }
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'

    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support:recyclerview-v7:26.1.0'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:support-v4:26.1.0'
    compile 'com.android.support:support-vector-drawable:26.1.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.guava:guava:19.0'
    compile 'com.dmitrymalkovich.android:material-design-dimens:1.4'
    compile 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
    compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
    compile 'com.jakewharton:butterknife:8.4.0'
    compile 'me.relex:circleindicator:1.2.2@aar'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    compile 'com.google.firebase:firebase-core:12.0.1'
    compile 'com.google.firebase:firebase-messaging:12.0.1'
    compile 'com.mobsandgeeks:android-saripaar:2.0.3'
    compile 'com.google.android.gms:play-services:12.0.1'
    compile 'org.greenrobot:eventbus:3.1.0'
    compile 'com.makeramen:roundedimageview:2.2.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    compile 'com.github.siyamed:android-shape-imageview:0.9.3'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.mcxiaoke.volley:library:1.0.19'
    compile 'com.balysv:material-ripple:1.0.2'

}
dependencies {
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
}
apply plugin: 'com.google.gms.google-services'
...