报错如下:
左边报错部分:
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()即可
感谢原博主:博主链接