android {...}configurations.all {    resolutionStrategy.force 'com.android.support:support-annotations:27.1.1'}dependencies {...}

Gradle DOC ResolutionStrategy

apply plugin: 'java' //so that there are some configurationsconfigurations.all {  resolutionStrategy {    // fail eagerly on version conflict (includes transitive dependencies)    // e.g. multiple different versions of the same dependency (group and name are equal)    failOnVersionConflict()    // prefer modules that are part of this build (multi-project or composite build) over external modules    preferProjectModules()    // force certain versions of dependencies (including transitive)    //  *append new forced modules:    force 'asm:asm-all:3.3.1', 'commons-io:commons-io:1.4'    //  *replace existing forced modules with new ones:    forcedModules = ['asm:asm-all:3.3.1']    // add dependency substitution rules    dependencySubstitution {      substitute module('org.gradle:api') with project(':api')      substitute project(':util') with module('org.gradle:util:3.0')    }    // cache dynamic versions for 10 minutes    cacheDynamicVersionsFor 10*60, 'seconds'    // don't cache changing modules at all    cacheChangingModulesFor 0, 'seconds'  }}

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. android中集成jpush与百度地图定位锁得知
  2. android 文件上传
  3. Android TV开发(—)开始电视应用
  4. Android Animation (动画设计)
  5. [camera drv]工厂模式下测试camera fail
  6. Android Http请求框架二:xUtils 框架网络
  7. 带阻尼回弹效果的RecyclerView
  8. android listView滚动时隔行出现黑色分割
  9. [置顶] Android仿人人客户端(v5.7.1)——应
  10. Android(安卓)简单实现倒计时功能