android studio " Could not resolve com.android.support:appcompat-v7:26.1.0"

 在Android  studio 3.0 的新工程依赖 “ com.android.support:design:26.1.0” 时,sync错误,报以下问题:

   Unable to resolve dependency for ‘:app@debug/compileClasspath’: Could not resolve com.android.support:appcompat-v7:26.1.0

  No cached version of com.android.support:design:26.1.0 available for offline mode.


  因为缓存里面没有这个26.1.0的版本,去settings->Build,Execution,Deployment->Gradle,取消“offline work”的勾选,让studio去下载即可。


    原文作者:小毕加猪
    原文地址: https://blog.csdn.net/qq_26984087/article/details/78518404
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞