Error:Could not resolve all files for configuration ':app:preDebugCompileClasspath'. > Could not fin

报错如下:

左边报错部分:
Error:Could not resolve all files for configuration ':app:preDebugCompileClasspath'.
> Could not find appcompat-v7.aar (com.android.support:appcompat-v7:26.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.aar



右边报错部分:
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:preDebugCompileClasspath'.
> Could not find appcompat-v7.aar (com.android.support:appcompat-v7:26.1.0).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.aar

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

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

BUILD FAILED in 1s

3 actionable tasks: 2 executed, 1 up-to-date

解决方法:

在项目的gradle下面添加Google()即可

感谢原博主:博主链接

发布了191 篇原创文章 · 获赞 105 · 访问量 36万+

猜你喜欢

转载自blog.csdn.net/xiayiye5/article/details/100152324