美文网首页
Android 各种报错解决

Android 各种报错解决

作者: c5550ea746f8 | 来源:发表于2020-12-17 16:39 被阅读0次

    报错:

    Caused by: org.gradle.api.resources.ResourceException: Unable to load Maven meta-data from https://maven.google.com/com/android/support/support-v4/maven-metadata.xml.

    Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not HEAD 'https://maven.google.com/com/android/support/support-v4/maven-metadata.xml'.

    Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to maven.google.com:443 [maven.google.com/216.58.200.14] failed: Read timed out

    Caused by: java.net.SocketTimeoutException: Read timed out

    原因:google 自家的 maven 仓库 http://maven.google.com 无法访问 或者 https://maven.google.com连接不上

    解决:在build.gradle里替换成maven { url 'https://dl.google.com/dl/android/maven2/' } 就OK了

    相关文章

      网友评论

          本文标题:Android 各种报错解决

          本文链接:https://www.haomeiwen.com/subject/oymzgktx.html