遇到这种错误提示“Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.”
除了去检测一下gradle配置相关以外,
还有就是SDK Location的配置信息一定要对。
如果这些都不行,那很明显就是你的build.gradle的 repositories信息配置没有采用国内镜像下载失败。你可以直接添加如下:
切记是
buildscript跟allprojects的repositories都要配置:
maven{ url 'https://maven.aliyun.com/repository/public' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'https://dl.google.com/dl/android/maven2/' }
maven { url "https://www.jitpack.io" }
再编译一下就ok了