Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Program type already present: android.support.v4.app.FragmentTransitionCompat21$1

I have been having an issue with duplications within my project this is the most common one it all seems to be related to the "android.support" bits

Error: Program type already present: android.support.v4.app.FragmentTransitionCompat21$1

Here is my app.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"

    defaultConfig {
        applicationId "com.company.myapp"
        minSdkVersion 28
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile project(':libraryMaskLayout')
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.github.lzyzsd:circleprogress:1.1.0@aar'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'cn.fanrunqi:waveprogress:1.0.1'
    implementation 'com.facebook.android:audience-network-sdk:4.15.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
}

Any help regarding this issue would be most appreciated.

like image 778
DecE Avatar asked Oct 16 '18 23:10

DecE


2 Answers

I included the below line, and it worked:

implementation 'com.android.support:design:28.0.0'
like image 175
O' alone Music Avatar answered Oct 29 '22 14:10

O' alone Music


I had the same issue as you. I searched everywhere and finally I got solution. Simply I added one dependency of version v4. part of my manifest is as below:

//Change the version according to your compileSdkVersion(Mine is 28)
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
like image 33
Nevil Ghelani Avatar answered Oct 29 '22 16:10

Nevil Ghelani