I have update my flutter ios pod by execute below two commands

cd iOS pod update --verbose after this i am getting below error in android

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'android.arch.lifecycle:runtime' has different version             
for the compile (1.0.0) and runtime (1.1.0) 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 0s

I have tried change flutter version in pubspec.yaml file default to

version: 1.1.0+1   


Solution 1: Marcel Salum

I was with the same problem, I solved putting:

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "26.1.0"
            }
        }
    }
}

At the end of android > build.gradle file

I hope this can work for you.


Solution 2: Aalkhodiry

This can happen with using firebase and targeting API level 26 (Android Oreo)

Add this to android\build.gradle inside buildscript {...}

   subprojects {
        project.configurations.all {
            resolutionStrategy.eachDependency { details ->
                if (details.requested.group == 'com.android.support'
                        && !details.requested.name.contains('multidex') ) {
                    details.useVersion "26.0.0"
                }
                if (details.requested.group == 'androidx.core'
                        && !details.requested.name.contains('androidx') ) {
                    details.useVersion "1.0.1"
                }
            }
        }
    }