Ramotion / garland-view-android

:octocat: ≡ GarlandView seamlessly transitions between multiple lists of content. Made by @Ramotion
https://www.ramotion.com/garland-view-android/
MIT License
1.83k stars 254 forks source link

Manifest merger failed #16

Closed tudor-paraschivescu closed 5 years ago

tudor-paraschivescu commented 5 years ago

Really awesome library! I have an issue though with using it in my app. After adding the dependency in my Gradle file I receive the next error:

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:19:5-52:19 to override.

After adding that line from the suggestion in my manifest, I get another error:

Manifest merger failed with multiple errors, see logs org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'

I have also checked the issue #15 and I think I got all the dependencies versions right, but it still doesn't work.

Here are my Gradle files:

build.gradle - Module

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.tudor.project"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:design:28.0.0'

    implementation 'com.google.firebase:firebase-auth:16.2.1'
    implementation 'com.google.firebase:firebase-firestore:18.2.0'
    implementation 'com.google.firebase:firebase-core:16.0.8'

    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.google.android.gms:play-services-nearby:16.0.0'

    implementation 'pub.devrel:easypermissions:2.0.1'
    implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
    implementation 'com.ramotion.garlandview:garland-view:0.3.3'
}

apply plugin: 'com.google.gms.google-services'

build.gradle - Project

buildscript {
    ext.kotlin_version = '1.3.31'
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.2.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

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

Any help would be truly appreciated as I cannot use this great-looking library because of this issue.

golovin47 commented 5 years ago

Hello, @tudor-paraschivescu. This lib migrated to androidX. If you'll also migrate your project to androidX (which is inevitable anyway at some point of time), this issue will be resolved. If for some reason you don't want to migrate your project, you may use previous previous versions of this lib, like 0.3.2.