Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle

1.情况

Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle_第1张图片
image.png

2.解决办法

后面查到说是Jcenter() 和google()被墙了,需要在前面加上Maven()
具体解决如下:
buildscript {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
google()
jcenter()
}
}
allprojects {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
google()
jcenter()
}
}
通过添加上述maven(),程序运行成功

你可能感兴趣的:(Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle)