无法解析’:app @ debug / compileClasspath’的依赖关系:无法解析com.android.support:appcompat-v7:26.1.0

无法解析’:app @ debug / compileClasspath’的依赖关系:无法解析com.android.support:appcompat-v7:26.1.0.

无法解析com.android.support:appcompat-v7:26.1.0.

要求:项目:app

No cached version of com.android.support:appcompat-v7:26.1.0 available for offline mode.

错误日志:

Could not resolve all files for configuration ‘:app:debugCompileClasspath’.
Could not resolve com.android.support:appcompat-v7:26.1.0.
required by:
project :app
No cached version of com.android.support:appcompat-v7:26.1.0 available for offline mode.
No cached version of com.android.support:appcompat-v7:26.1.0 available for offline mode.
Could not resolve com.android.support.constraint:constraint-layout:1.1.0-beta3.
required by:
project :app
No cached version of com.android.support.constraint:constraint-layout:1.1.0-beta3 available for offline mode.
No cached version of com.android.support.constraint:constraint-layout:1.1.0-beta3 available for offline mode.
Could not resolve com.android.support:design:26.1.0.
required by:
project :app
No cached version of com.android.support:design:26.1.0 available for offline mode.
No cached version of com.android.support:design:26.1.0 available for offline mode.
Could not resolve com.android.support:cardview-v7:26.1.0.
required by:
project :app
No cached version of com.android.support:cardview-v7:26.1.0 available for offline mode.
No cached version of com.android.support:cardview-v7:26.1.0 available for offline mode.
Could not resolve com.google.android.gms:play-services-ads:11.4.2.
required by:
project :app
No cached version of com.google.android.gms:play-services-ads:11.4.2 available for offline mode.
No cached version of com.google.android.gms:play-services-ads:11.4.2 available for offline mode.
Could not resolve com.android.support:support-v4:26.1.0.
required by:
project :app
No cached version of com.android.support:support-v4:26.1.0 available for offline mode.
No cached version of com.android.support:support-v4:26.1.0 available for offline mode.

错误日志图片

解决方法:

转到文件 – >其他设置 – >认设置 – >构建,执行,部署 – >构建工具 – > Gradle->取消选中离线工作选项.

相关文章

安装环境都很简单,就是下载工具需要在华为开发者联盟里注册...
上传的方式有两种,第一种是通过bintray官方出的插件bintray...
转载自: 完美解决Error:SSLpeershutdownincorrectly打开gr...
https://www.jianshu.com/p/9220227cdfb3buildscript{ext.ko...
Markdown版本笔记我的GitHub首页我的博客我的微信我的邮箱My...
 跟着教程做的,已经有了JDK,直接进行后面的步骤,下载安装...