[英]HttpRequestException: Could Not Head warning in Android Studio 3.1.1 (But Sync Successfully)
Hi I facing a problem while syncing the project. 嗨,我在同步项目时遇到问题。 I am getting warning after sync successfully 同步成功后,我收到警告
I don't know why I am getting this warning. 我不知道为什么收到此警告。 If click on warning in build window than get this message 如果在构建窗口中单击警告而不是得到此消息
Message in image is 图片中的消息为
org.gradle.internal.resource.transport.http.HttpRequestException: Could not HEAD 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'
. org.gradle.internal.resource.transport.http.HttpRequestException: Could not HEAD 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'
。
Caused by: 造成原因:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
If Click on url
如果点击url
https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom than get this message - https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom比获得此消息-
{
"errors" : [ {
"status" : 404,
"message" : "Could not find resource"
} ]
}
I am using 我在用
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.3.0'
and 和
implementation "com.android.support:appcompat-v7:${support_version}"
implementation "com.android.support:design:${support_version}"
implementation "com.google.firebase:firebase-core:${play_version}"
implementation "com.google.firebase:firebase-config:${play_version}"
implementation "com.google.firebase:firebase-messaging:${play_version}"
implementation "com.google.android.gms:play-services-tagmanager:${play_version}"
implementation "com.google.android.gms:play-services-auth:${play_version_old}"
implementation "com.google.android.gms:play-services-maps:${play_version_old}"
implementation "com.google.android.gms:play-services-location:${play_version_old}"
buildscript{
ext{
play_version = '15.0.2'
play_version_old = '15.0.0'
support_version = '27.1.1'
}
}
我通过文件->设置->工具->服务器证书->自动接受不受信任的证书来解决此问题
Make sure you are connected to Internet and if you are connected to Internet then your Internet firewall is forbidding to make connection with https://jcenter.bintray.com
. 确保您已连接到Internet,如果您已连接到Internet,则您的Internet防火墙禁止与https://jcenter.bintray.com
建立连接。 Try to sync with different Internet connection. 尝试与其他Internet连接进行同步。
I had same problem while upgrading gradle
version in my office Internet but when I tried with by personal Internet connection it went softly. 在我的办公室Internet中升级gradle
版本时,我遇到了同样的问题,但是当我尝试通过个人Internet连接尝试时,它进展缓慢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.