美文网首页
Landroid/support/v4/animation/An

Landroid/support/v4/animation/An

作者: 敌军不是十五万 | 来源:发表于2018-11-16 10:07 被阅读48次

最终解决方案

参考stackoverflow第三个回答

compile 'com.android.support:appcompat-v7:你当前依赖的版本号'
compile 'com.android.support:design:你当前依赖的版本号'
compile 'com.android.support:cardview-v7:你当前依赖的版本号'

以下是参考文章support中v4 v7库版本错误详解,被 pass 掉的解决方案如下:

  • 排除依赖中的指定包
compile ('com.mcxiaoke.viewpagerindicator:library:x.x.x') {
        exclude group: 'com.android.support'
    }
  • force强制设置某个模块的版本
configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-v4:xx.x.x'
    }
}
  • com.android.support包名的库版本都是用你当前依赖的版本号
configurations.all {
   resolutionStrategy.eachDependency { DependencyResolveDetails details ->
       def requested = details.requested
       if (requested.group == 'com.android.support') {
           if (!requested.name.startsWith("multidex")) {
               details.useVersion '你当前依赖的版本号'
           }
       }
   }
}

相关文章

网友评论

      本文标题:Landroid/support/v4/animation/An

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