ошибка Повторяющаяся запись в jar [android / support / v4 / media / MediaBrowserCompat $ a.class] - PullRequest
0 голосов
/ 20 марта 2019

Я испробовал почти все решения, которые есть в StackOverflow. Я недавно обновил свой SDK с 27 до 28, и теперь при развертывании моего приложения, я получаю эту ошибку, если я откатываю обновление, это дает мне ошибку связывания ресурса в значениях merged.dir.XML до этого мое приложение работало корректно

Сборка моего приложения Gradle равна

    apply plugin: 'com.android.application'
    android {
     compileSdkVersion 28
     defaultConfig {
         applicationId "com.tech.usman.securityapp"
         minSdkVersion 15
         targetSdkVersion 28
         versionCode 3
         versionName "2"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         vectorDrawables.useSupportLibrary = true
     }
     buildTypes {
         /*release {
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'),   'proguard-rules.pro'
         }*/
         release {
             debuggable false
             minifyEnabled true
             shrinkResources true
             proguardFiles getDefaultProguardFile('proguard-android.txt'),  'proguard-rules.pro'
        }
     debug {
             debuggable true
             minifyEnabled true
             shrinkResources true
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
     packagingOptions {
         pickFirst 'META-INF/LICENSE.txt' // picks the JavaMail license file
     }
     compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
     }
    }
    dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
    implementation 'com.google.android.material:material:1.0.0-beta01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01'
    implementation 'androidx.vectordrawable:vectordrawable:1.0.0-beta01'
    implementation 'com.google.firebase:firebase-messaging:17.4.0'
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.android.support:appcompat-v7:27.0.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.android.gms:play-services-location:15.0.1'
    implementation 'com.android.support:design:27.0.1'
    implementation 'com.github.ceryle:RadioRealButton:v2.1.1'
    implementation 'com.android.support:support-v4:27.0.1'
    implementation 'com.android.support:support-vector-drawable:27.0.1'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    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'
    // retrofit, gson
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    //implementation 'com.github.faruktoptas:FancyShowCaseView:1.0.0'
    //circular progress
    implementation 'com.github.rahatarmanahmed:circularprogressview:2.5.0'
    //tray
    implementation 'net.grandcentrix.tray:tray:0.12.0'
    implementation('io.socket:socket.io-client:1.0.0') {

        exclude group: 'org.json', module: 'json'
    }
    //http
    //http looging
    implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
    //dextor
    implementation 'com.karumi:dexter:5.0.0'
    //event bus
    implementation 'org.greenrobot:eventbus:3.1.1'
    //rx java
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.0'
    implementation 'ru.rambler.android:swipe-layout:1.0.15'

    implementation 'com.android.support:recyclerview-v7:27.0.1'
}

И ранее в сборке моего проекта была версия com.android.tools.build:gradle:3.1.4

 buildscript {

    repositories {
        google()
        jcenter()
        /*maven {
            url 'https://maven.fabric.io/public'
        }*/

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'
        classpath 'com.google.gms:google-services:4.0.1'
        //classpath 'io.fabric.tools:gradle:1.25.4'



        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

    allprojects {
        repositories {
            jcenter()
            google()
            maven {
                url "https://maven.java.net/content/groups/public/"
            }
            maven { url "https://jitpack.io" }
        }
    }

    task clean(type: Delete) {
        delete rootProject.buildDir
    }
...