1.出现Could not get resource ‘https://dl.google.com/ 的处理

  • What went wrong:

A problem occurred evaluating project ':app'.

Could not resolve all artifacts for configuration 'classpath'. Could not resolve com.android.tools.build:gradle:4.1.0. Required by: unspecified:unspecified:unspecified Could not resolve com.android.tools.build:gradle:4.1.0. Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'. Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'. Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

BUILD FAILED in 1m 16s

Exception: Gradle task assembleDebug failed with exit code 1

解决:

修改host文件

203.208.40.33 dl.google.com

203.208.40.33 dl-ssl.google.com

203.208.40.33 www.google.com

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐