Failed to resolve: com.android.support:appcompat-v7:27.0.1问题解决

今天,在毫无征兆的情况下AndroidStudio又抽风了,搞了大半天,试了网上众多方案,终于解决了这个问题。咱们一步一步来

第一步:这是最开始的bug
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” }即可,如图


同时,打开SDK Manager



检查repository是否已经下载,并安装

原文地址:https://www.cnblogs.com/hackpig/p/8503942.html