这个问题搞了很长时间,今天看到一篇博客解决了:
https://blog.csdn.net/waa_studio/article/details/78732460
Error:Failed to resolve: com.android.support:support-annotations:27.0.1
Install Repository and sync project
Open File
Show in Project Structure dialog
Error:Failed to resolve: com.android.support:appcompat-v7:27.0.1
Install Repository and sync project
Open File
Show in Project Structure dialog
这个问题可以通过修改project的gradle,添加maven { url “https://maven.google.com” }即可,如图