ionic build android Could not resolve com.android.tools.build:gradle:1.5.0

来源:互联网 发布:软件账号密码扫描 编辑:程序博客网 时间:2024/05/02 01:20
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:1.5.0.
     Required by:
         :android:unspecified
      > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom'.
         > peer not authenticated


* Try:


BUILD FAILED

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


解决办法:

在 ionic platform add android 之后
主动修改 xx\platforms\android 目录 和 xx\platforms\android\CordovaLib 目录下的 build.gradle
把 mavenCentral() 改成 

jcenter {
url "http://jcenter.bintray.com/"
}




1 0
原创粉丝点击