报错:Could not find lint.jar (com.android.tools.lint:lint:26.1.2).

遇到as工具抽风,就比较难了
不幸,今天又遇到了,编译代码(前天 都还编译好好的:)时出现了如下报错

Could not find lint.jar (com.android.tools.lint:lint:26.1.2).
Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/lint/lint/26.1.2/lint-26.1.2.jar



    Caused by: org.gradle.internal.resolve.ArtifactNotFoundException: Could not find lint.jar (com.android.tools.lint:lint:26.1.2).

点进去 https://jcenter.bintray.com/com/android/tools/lint/lint/26.1.2/lint-26.1.2.jar这个地址时,出现了404

百度了一下说是:网络太慢,导致资源下载不下来

解决方案:
在gradle配置中添加 阿里的源:国内镜像 下载快
maven{url ‘http://maven.aliyun.com/nexus/content/groups/public/’}
或者:
maven{ url ‘https://maven.aliyun.com/repository/public/’}

然后顺便又到jcenter仓库中搜寻了一下:
jcenter仓库地址:JB 最低现在只支持到 AS 3.4
https://jcenter.bintray.com
然后再根据具体的路径拼接搜索:如下
https://jcenter.bintray.com/com/android/tools/lint/lint

google仓库地址:
https:maven.google.com/web/index.html

你可能感兴趣的:(Android)