美文网首页
'com.android.support:appcompat-v

'com.android.support:appcompat-v

作者: 我爱大小宝 | 来源:发表于2019-02-02 17:00 被阅读0次

'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.0.1) classpath

buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'
        

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}
//这段是重点
subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "26.1.0"
            }
        }
    }
}

相关文章

网友评论

      本文标题:'com.android.support:appcompat-v

      本文链接:https://www.haomeiwen.com/subject/fcnssqtx.html