欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

com.android.support版本沖突解決方法

 更新時間:2019年09月12日 15:27:18   作者:tc310  
在本篇文章里小編給大家整理的是關于com.android.support版本沖突解決方法以及相關知識點,需要的朋友們學習下。

項目中不同Module的support包版本沖突怎么辦?

只需要將以下代碼復制到每個模塊的build.gradle(Module:xxx)文件的根目錄即可:

// 統(tǒng)一當前Module的所有support包版本
configurations.all {
  resolutionStrategy.eachDependency { DependencyResolveDetails details ->
    def requested = details.requested
    if (requested.group == 'com.android.support') {
      if (!requested.name.startsWith("multidex")) {
        details.useVersion '28.0.0'
      }
    }
  }
}

模板代碼如下:

apply plugin: 'com.android.application'

android {
  compileSdkVersion 28
  defaultConfig {
    ...
  }
  buildTypes {
    ...
  }

  lintOptions {
    ...
  }
}

dependencies {
  ...
}

configurations.all {
  resolutionStrategy.eachDependency { DependencyResolveDetails details ->
    def requested = details.requested
    if (requested.group == 'com.android.support') {
      if (!requested.name.startsWith("multidex")) {
        details.useVersion '28.0.0'
      }
    }
  }
}

以上就是相關全部知識點內容,感謝大家的學習和對腳本之家的支持。

相關文章

最新評論