Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).

Android studio打包出现:

Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).

Searched in the following locations:

    https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar


网上好多方法,有的说加google(),有的说加阿里的maven镜像…

试了发现这些方法都不行,最后发现在app的build.gradle中的jcenter()和google()的顺序写反了,

应该是google()在前边jcenter()在后边

buildscript {

    repositories {

        google()

        jcenter()

    }

}

    原文作者:wuli见见
    原文地址: https://www.jianshu.com/p/7a4a129a5ca2
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞