zoukankan      html  css  js  c++  java
  • Android 模块构建错误不能下载依赖包

    在模块的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

  • 相关阅读:
    内存溢出与内存泄露的区别
    <a>标签
    mac上的设置查看环境变量
    css-position
    css-overflow
    css-clear
    mongodb基本操作
    idea使用maven install命令打包(springboot),jar运行时出现没有主清单属性
    linux运行jar报错
    maven deploy时报错
  • 原文地址:https://www.cnblogs.com/tangchun/p/9341012.html
Copyright © 2011-2022 走看看