Morecoin Synchnorized 做推广 SCI networking memory mysqli vcpkg linktosql nosql uiwebview vue添加class 郑州小程序公司 jq获取元素宽度 html好看的字体样式 matlab网页版 数据库教程 python指令 python插件 java中基本数据类型 学java基础 java声明变量 删除数组中的某个元素 kms神龙 只狼鬼佛 骰子表情 bz2 mac画图工具 ansys安装教程 文明6万神殿 xmind画流程图 renderto 梦想世界科举答案 maplesim 幽灵推 中文微信小程序API 主播音效 ppt虚线怎么画 php定时任务 js添加节点
当前位置: 首页 > 学习教程  > 编程语言

Android Studio Build报错:Could not download support-v4.aar (com.android.support:support-v4:28.0.0)

2020/12/28 18:41:34 文章标签:

报错信息如下:Could not download recyclerview-v7.aar (com.android.support:recyclerview-v7:28.0.0) (这个问题搞了我一上午,太浪费时间啦!) ERROR: Unable to resolve dependency for :AppDemodebugUnitTest/com…

报错信息如下:Could not download recyclerview-v7.aar (com.android.support:recyclerview-v7:28.0.0)  (这个问题搞了我一上午,太浪费时间啦!)

ERROR: Unable to resolve dependency for ':AppDemo@debugUnitTest/compileClasspath': Could not download constraint-layout-solver.jar (com.android.support.constraint:constraint-layout-solver:1.1.3)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@release/compileClasspath': Could not download support-v4.aar (com.android.support:support-v4:28.0.0)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@release/compileClasspath': Could not download design.aar (com.android.support:design:28.0.0)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@release/compileClasspath': Could not download constraint-layout.aar (com.android.support.constraint:constraint-layout:1.1.3)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@release/compileClasspath': Could not download support-media-compat.aar (com.android.support:support-media-compat:28.0.0)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@release/compileClasspath': Could not download recyclerview-v7.aar (com.android.support:recyclerview-v7:28.0.0)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@release/compileClasspath': Could not download transition.aar (com.android.support:transition:28.0.0)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@release/compileClasspath': Could not download cardview-v7.aar (com.android.support:cardview-v7:28.0.0)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@release/compileClasspath': Could not download constraint-layout-solver.jar (com.android.support.constraint:constraint-layout-solver:1.1.3)
Show Details
Affected Modules: AppDemo


ERROR: Unable to resolve dependency for ':AppDemo@releaseUnitTest/compileClasspath': Could not download support-v4.aar (com.android.support:support-v4:28.0.0)
Show Details
Affected Modules: AppDemo

原因分析:连接不上google的服务器

解决办法:1、购买VPN,翻墙重新编译

2、找到工程级别的build.gradle文件,将

repositories {
    google()
    jcenter()
    mavenCentral()
}

修改成阿里云的服务

allprojects {
    repositories {
        //阿里的镜像地址(注意用这个)
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'http://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        //自己的工程
        maven { url 'https://maven.google.com' }
        maven { url 'https://jitpack.io' }
        jcenter()
        mavenCentral()
        maven { url "https://dl.google.com/dl/android/maven2/" }
    }
}

重新build工程。


本文链接: http://www.dtmao.cc/news_show_550085.shtml

附件下载

相关教程

    暂无相关的数据...

共有条评论 网友评论

验证码: 看不清楚?