flutter Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and...

解决方案

在build.gradle文件中添加

中间subprojects这一段


buildscript {

    repositories {

        google()

        jcenter()

    }


    dependencies {

        classpath 'com.android.tools.build:gradle:3.2.1'

    }


    subprojects {

        project.configurations.all {

            resolutionStrategy.eachDependency { details ->

                if (details.requested.group == 'com.android.support'

                        && !details.requested.name.contains('multidex') ) {

                    details.useVersion "27.1.1"

                }


                if (details.requested.group == 'androidx.core'

                        && !details.requested.name.contains('androidx') ) {

                    details.useVersion "1.0.1"

                }

            }

        }

    }

}

参考 https://github.com/flutter/flutter/issues/27254

你可能感兴趣的:(flutter Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and...)