Git Product home page Git Product logo

Comments (6)

hnvn avatar hnvn commented on August 17, 2024

Try this:

allprojects {
    ...

    configurations {
        all {
            resolutionStrategy {
                force "android.arch.lifecycle:runtime:1.1.1"
            }
        }
    }

}

more detail at: https://stackoverflow.com/a/50047277/3693334

from flutter_downloader.

gurnisht avatar gurnisht commented on August 17, 2024

Thanks for your reply. I tried it but it still doesn't build. now it gives me a list of many different jars, with "com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives".
(I closed the issue by mistake and reopened)

from flutter_downloader.

hnvn avatar hnvn commented on August 17, 2024

You can follow the notice about Firebase integration in README document

from flutter_downloader.

gurnisht avatar gurnisht commented on August 17, 2024

Thanks for your kind help. I tried the suggested workaround too and it still didn't solve, I'm still getting the original error (Android dependency 'android.arch.lifecycle:runtime' has different version for the compile (1.0.0) and runtime (1.1.0) classpath).

Here is my build.gradle

buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }

    configurations.all {
        exclude group: 'com.google.guava', module: 'failureaccess'

        resolutionStrategy {
            eachDependency { details ->
                if('guava' == details.requested.name) {
                    details.useVersion '27.0-android'
                }
            }
        }
    }

}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

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

from flutter_downloader.

hnvn avatar hnvn commented on August 17, 2024

You should combine two configs together:

configurations {
        all {
            exclude group: 'com.google.guava', module: 'failureaccess'
            
            resolutionStrategy {
                eachDependency { details ->
                    if('guava' == details.requested.name) {
                        details.useVersion '27.0-android'
                    }
                    if('android.arch.lifecycle' == details.requested.group && 'runtime' == details.requested.name) {
                       details.useVersion '1.1.1'
                    }
               }
            }
    }

I just try to write codes directly in comment box, not sure that it's right syntax.

from flutter_downloader.

gurnisht avatar gurnisht commented on August 17, 2024

Works! thanks!

from flutter_downloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.