欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

Android 模块构建错误不能下载依赖包

程序员文章站 2023-03-27 15:55:26
在模块的build.gradle里面添加了 Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:design:26.1.0.Open FileSho ......

在模块的build.gradle里面添加了

implementation 'com.android.support:design:26.1.0' 

构建的时候一直报这个错

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:design:26.1.0.
Open File
Show Details

解决办法:

查看 Gradle Scripts 下面的 gradle.properties文件里面是不是默认设置了代理 注释掉就ok了  android Studio的更新不在依靠代理了  

## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Tue Jul 17 14:19:04 CST 2018
#systemProp.https.proxyPort=80
#systemProp.http.proxyHost=mirrors.neusoft.edu.cn
#systemProp.https.proxyHost=mirrors.neusoft.edu.cn
#systemProp.http.proxyPort=80

注释后,重新构建,一切ok