天天看點

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