无法解析 ':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->取消选中离线工作选项。
关于android - 无法解决 ':app@debug/compileClasspath' : Could not resolve com. android.support :appcompat-v7:26. 1.0 的依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46999594/