【发布时间】:2016-08-27 18:03:23
【问题描述】:
这是我在ionic build android 之后的堆栈跟踪,经过简单的三个步骤即可开始使用ionic:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:2.1.0.
Required by:
:android:unspecified
> Could not resolve com.android.tools.build:gradle:2.1.0.
> Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.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 com.android.tools.build:gradle:2.1.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
所有代码都是$ ionic start myApp tabs自带的默认代码
我尝试更改 gradle 版本,更新 cordova。 我也尝试在 build.gradle 中添加这一行:
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
我也这样做了,以防万一: When running the "Cordova build android" I'm getting the below exception
【问题讨论】:
标签: android cordova gradle ionic-framework