Q: 'androidx.lifecycle:lifecycle-runtime' has different version for the compile I'm facing issue when work with 2 dependences together , I'm using this dependences in pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
  location: ^2.3.5 .  ** this one
  image_picker: ^0.6.1+10 ** this one

if use these dependents will show the next issue in blow
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.core:core' has different version for the compile (1.0.0-rc01) and runtime (1.0.2) classpath. You should manually set the same version via DependencyResolution

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

but if I use one of these dependencies it worked as good , but if both together make the same issue in top 
this is code of 
gradle.properties
android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx1536M

this is code of 
build.gradle
buildscript {
    ext.kotlin_version = '1.2.71'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

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

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

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

Edit
I tred to downgrade this package   image_picker to 0.6.1+1 or less and it's working now !! but I want to know is there regular fix way another this ? 

A: I had a similar error recently.
You just have to explicitly tell the compiler which version of the dependency to use.
That did the trick for me.
You can re-write this section of your project-level build.gradle file:
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

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

    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
           if (details.requested.group == 'androidx.core'
            && !details.requested.name.contains('multidex')) {
            details.useVersion "1.0.2"
        }
    }
}

I hope that fixes your issue :)
