亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

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

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

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

// 統(tǒng)一當(dā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'
      }
    }
  }
}

以上就是相關(guān)全部知識點(diǎn)內(nèi)容,感謝大家的學(xué)習(xí)和對腳本之家的支持。

相關(guān)文章

最新評論