1. 导入依赖库出现错误

Android开发过程中的坑及解决方法收录(五)

因为使用的sdk版本不同,使用下列代码强制使用最低版本,25.3.1就是我当前使用的版本号,根据自己的情况修改

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

        }

如果想一劳永逸的话,和之前一样设置AS的模板即可
参考链接
彻底解决的方法以及修改AScompileSDKVersion

相关文章:

  • 2021-09-06
  • 2022-12-23
猜你喜欢
  • 2022-02-24
  • 2021-10-21
  • 2021-08-23
  • 2022-01-17
  • 2021-06-07
  • 2021-06-08
相关资源
相似解决方案