简体   繁体   English

Android Studio背后的代理

[英]Android Studio behind the proxy

I know this type of questions is around since many years and I tried each and every solution with no luck.我知道这种类型的问题已经存在很多年了,我尝试了每一个解决方案都没有运气。

I am trying to setup development environment with Android Studio with Flutter.我正在尝试使用 Android Studio 和 Flutter 设置开发环境。 I am keep getting error regarding the certificate.我不断收到有关证书的错误。

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径

I tried to change https to http in the gradle prop file and also tried to change from jcenter() to maven but it is not working. I tried to change https to http in the gradle prop file and also tried to change from jcenter() to maven but it is not working. Also I tried to import the certificate using the KeyStore Explorer , it says successfully imported but throwing same error when I am trying to run the project.我还尝试使用KeyStore Explorer导入证书,它说成功导入但在我尝试运行项目时抛出相同的错误。

What went wrong: A problem occurred configuring root project 'android'.出了什么问题:配置根项目“android”时出现问题。 Could not resolve all artifacts for configuration ':classpath'.无法解析配置“:classpath”的所有工件。 Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71.无法解析 org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71。 Required by: project: Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71.要求:项目:无法解析 org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71。 Could not get resource ' https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.71/kotlin-gradle-plugin-1.2.71.pom '.无法获取资源“ https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.71/kotlin-gradle-plugin-1.2.71.pom ”。 Could not GET ' https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.71/kotlin-gradle-plugin-1.2.71.pom '.无法获取“ https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.2.71/kotlin-gradle-plugin-1.2.71.pom ”。 sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.11. sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径无法解析 org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.11 . Required by: project: > com.android.tools.build:gradle:3.3.0 project: > com.android.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 project: > com.android.tools.build:gradle:3.3.0 > com.android.tools.analytics-library:shared:26.3.0 project: > com.android.tools.build:gradle:3.3.0 > com.android.tools.lint:lint-gradle-api:26.3.0 project: > com.android.tools.build:gradle:3.3.0 > Z Required by: project: > com.android.tools.build:gradle:3.3.0 project: > com.android.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 project : > com.android.tools.build:gradle:3.3.0 > com.android.tools.analytics-library:shared:26.3.0 project: > com.android.tools.build:gradle:3.3.0 > com. android.tools.lint:lint-gradle-api:26.3.0 project: > com.android.tools.build:gradle:3.3.0 > Z 4D236D9A2D102C5FE6AD1C50DA4BEC50Z.android.tools.build:gradle-api:3.3.0 project: > com.android.tools.build:gradle:3.3.0 > androidx.databinding:databinding-compiler-common:3.3.0 project: > com.android.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools:sdk-common:26.3.0 project: > com.android.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools:common:26.3.0 project: > com.ZC31B32364CE1 4D236D9A2D102C5FE6AD1C50DA4BEC50Z.android.tools.build:gradle-api:3.3.0 project: > com.android.tools.build:gradle:3.3.0 > androidx.databinding:databinding-compiler-common:3.3.0 project: > com. android.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools:sdk-common:26.3.0 project: > com.android.tools.build: gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools:common:26.3.0 project: > com.ZC31B32364CE1 9CA8FCD150A417ECCE58Z.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools.build:manifest-merger:26.3.0 project: > com.android.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools.analytics-library:tracker:26.3.0 project: > com.android.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools:sdklib:26.3.0 > com.ZC31B32364CE19CA 9CA8FCD150A417ECCE58Z.tools.build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools.build:manifest-merger:26.3.0 project: > com.android.tools. build:gradle:3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools.analytics-library:tracker:26.3.0 project: > com.android.tools.build:gradle: 3.3.0 > com.android.tools.build:builder:3.3.0 > com.android.tools:sdklib:26.3.0 > com.ZC31B32364CE19CA 8FCD150A417ECCE58Z.tools:repository:26.3.0 Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.11. 8FCD150A417ECCE58Z.tools:repository:26.3.0 无法解析 org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.11。 Could not get resource ' https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.11/kotlin-stdlib-jdk8-1.3.11.pom '.无法获取资源“ https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.11/kotlin-stdlib-jdk8-1.3.11.pom ”。 Could not GET ' https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.11/kotlin-stdlib-jdk8-1.3.11.pom '.无法获取“ https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.11/kotlin-stdlib-jdk8-1.3.11.pom ”。 sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Could not resolve org.ow2.asm:asm:6.0. sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径无法解析 org.ow2.asm:asm:6.0。

I talked with my admin team and they are asking for which URLs they need to white list in order to make the flutter work.我与我的管理团队进行了交谈,他们询问他们需要将哪些 URL 列入白名单,以使 flutter 正常工作。 Let me know if you know what to be white listed.如果你知道什么是白名单,请告诉我。

If you're behind a proxy at work, your Server Team may be blocking certain file types.如果您在工作中使用代理,您的服务器团队可能会阻止某些文件类型。 That's the case for me as I don't have any of these issues when working from an outside line.对我来说就是这种情况,因为在外线工作时我没有任何这些问题。

Try copying and pasting the link into a browser and look at the error message.尝试将链接复制并粘贴到浏览器中,然后查看错误消息。

Alternatively, you could try emailing your Server Team and have them open it up for you (temporarily).或者,您可以尝试向您的服务器团队发送电子邮件,让他们(暂时)为您打开它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM