1. 程式人生 > >Could not resolve all files for configuration ':library:lintClassPath' Could not find com.android.to

Could not resolve all files for configuration ':library:lintClassPath' Could not find com.android.to

gradle打包出現一下錯誤:

* What went wrong:

Could not resolve all files for configuration ':library:lintClassPath'.
> Could not find com.android.tools.lint:lint-gradle:26.1.3.
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.pom
      https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.jar
      https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.pom
      https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.jar
      https://jitpack.io/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.pom
      https://jitpack.io/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.jar
  Required by:
      project :library

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 47s

107 actionable tasks: 7 executed, 100 up-to-date

解決方法:

在專案的build.gradle中加上google(),加兩個。。    注意:不是app裡面的build.gradle

如下: