【发布时间】:2018-04-10 22:36:27
【问题描述】:
您能帮我解决 Android 3.0 中的 Gradle 构建问题吗?
我是 Android Studio 的新手。 这是我在 AS 3.0 中的配置:
gradle->wrapper->gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip
build.gradle 依赖项(Android Plugin for Gradle):
dependencies {classpath 'com.android.tools.build:gradle:3.0.0'}
来自 Android Studio 的堆栈跟踪:
D:\AppiumAutomation\MobileTest>gradlew assemble --stacktrace
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'MobileTest'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification pat
h to requested target
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification pat
h to requested target
【问题讨论】:
-
您是否在使用代理?如果不是,你应该是吗?
-
嗨 cricket_007:不,我不在代理后面。
-
嗯,错误与网络有关。它无法为那些
https站点获取 SSL 证书 -
我正在尝试的工作站位于公司网络下,并且正在通过 VPN 远程工作('mstsc' - 远程桌面连接)。这有什么区别吗?
标签: android android-studio gradle android-studio-3.0