报错截图:

问题原因:因为build.gradle中jcenter()或者maven()被墙了,所以会出现这种情况。

解决方案:(我的gradle版本是:classpath 'com.android.tools.build:gradle:3.2.1')

在Project的build.gradle加入以下代码,需将maven{}写在jcenter()之前,确保先访问maven()里面的连接。

maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}

解决截图:

安卓 android studio 报错 Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle.的更多相关文章

  1. Unknown host mirrors.opencas.cn You may need to adjust the proxy settings in Gradle 报错及解决办法

    亲测Unknown host mirrors.opencas.cn You may need to adjust the proxy settings in Gradle 解决办法 - 程序员大本营 ...

  2. 解决Unknown host 'd29vzk4ow07wi7.cloudfront.net'. You may need to adjust the proxy settings in Gradle.

    有时候打开AndroidStudio项目,没问题啊,昨天还打开没事的,今天打不开了或者你同步了一下项目,报错了.很无辜有没有.有时候多开机几次,多关几次AS,又莫名好了. 尝试过很多方法无效,这个文章 ...

  3. Unknown host 'd29vzk4ow07wi7.cloudfront.net'. You may need to adjust the proxy settings in Gradle.

    修改项目下build.gradle文件 在jcenter()前添加mavenCentral() 1 // Top-level build file where you can add configur ...

  4. 安卓 android studio 报错 All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com

    这个问题是Android studio升级到3.0之后,运行的时候会提示gradle要升级到3.5版本才能编译.于是我把我的gradle升级到了 gradle-4.1-milestone-1 版本,是 ...

  5. 安卓 android studio 报错 The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle

    今天将项目迁移到另一台笔记本,进行build出现以下问题,导致build失败 报错截图: 大致意思,目前使用的build工具版本27.0.3不合适.因为当前使用Gradle插件版本是3.2.1,这个版 ...

  6. 安卓 android studio 报错 Lint found fatal errors while assembling a release target

    报错截图如下: 解决方法:在app的build.gradle中添加如下代码 android{ lintOptions { checkReleaseBuilds false abortOnError f ...

  7. 安卓 android studio 报错 WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and

    报错截图: 问题原因:compile会被在2018年底取消,会被imlementation替代,所以会报这个警告,解决警告的方式就是换成 imlementation 就好了 解决方法: 在 app 的 ...

  8. 安卓 android studio 报错 Could not find com.android.tools.build:gradle:3.2.1.

    报错截图如下: 解决方法:在project的builde.gradle做如下操作分别加上google()

  9. Android Studio报错问题集锦

    Android Studio使用过程中坑太多,动不动就报错,每次出现问题都是上百度去搜索,需要花费很大的时间和精力才能解决掉问题. 为了以后更高效的使用这款工具,在这里记录下来我已经踩过的坑和即将要踩 ...

随机推荐

  1. Spring源码窥探之:ImportBeanDefinitionRegistrar

    1. 编写实现ImportBeanDefinitionRegistrar的类 /** * description * * @author 70KG * @date 2018/11/13 */ publ ...

  2. Win10 系统 Mysql 安装

    对于本地开发环境,小型的 Mysql 比较适合本地学习. 本文环境 win10 + mysql8 1.下载 去 Mysql 官网下载安装包 - https://dev.mysql.com/downlo ...

  3. C# 函数参数中的this

    先看下面的代码: public static class StringExtension { public static void Foo(this string s) { Console.Write ...

  4. Go Node.js 生成的exe公布成windows服务

    环境变量 GOBIN E:\01_SOFT\go1.9.2\bin GOROOT E:\01_SOFT\go1.9.2 GOPATH(下载包的存放位置:go get github.com/gin-go ...

  5. BZOJ 4332: JSOI2012 分零食 FFT+分治

    好题好题~ #include <bits/stdc++.h> #define N 50020 #define ll long long #define setIO(s) freopen(s ...

  6. PHP命令行常用参数说明和使用

    -i 打印phpinfo命令 root@DK:/mnt/hgfs/cpp/php# php -i | grep session -v 输出php版本信息 root@DK:/mnt/hgfs/cpp/p ...

  7. luogu P1160 队列安排

    二次联通门 :luogu P1160 队列安排 /* luogu P1160 队列安排 链表 手动模拟一下就好了... */ #include <cstdio> #define Max 5 ...

  8. 复旦高等代数 II(15级)每周一题

    [问题2016S01]  设 $f(x)=x^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0$ 是整系数首一多项式, 满足: $|a_0|$ 是素数且 $$|a_0|>1+\s ...

  9. Video Reviews

    题目链接:http://codeforces.com/gym/101755/problem/K 题目理解: 一家公司想让n个人给他们的产品评论,所以依次去找这n个人,第i个人会评论当且仅当已经有ai个 ...

  10. [golang][译]使用os/exec执行命令

    [golang][译]使用os/exec执行命令 https://colobu.com/2017/06/19/advanced-command-execution-in-Go-with-os-exec ...