天天看点

Android统一依赖多个不同版本的Support v7包

解决这个问题再gradle(project)目录添加

ext {

    supportlib_version = '26.1.0'

}

subprojects {

    project.configurations.all {

        resolutionStrategy.eachDependency { details ->

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

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

                details.useVersion "$supportlib_version"

            }

        }

    }

}

问题链接:

https://github.com/afollestad/material-dialogs/issues/1579

https://stackoverflow.com/questions/48027019/how-to-manage-different-support-library-versions-for-3rd-party-deps-with-gradle