Reputation: 15
while building cordova project i get the follwing error on running command cordova build android?
please help with the follwoing code
C:\Users\gaurav-s\hello>cordova build android
ANDROID_HOME=D:\adt-bundle-windows-x86-20140702\sdk JAVA_HOME=C:\Program Files\Java\jdk1.7.0
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://jcenter.bintray.com/com/android/tools/build/gradl e/1.5.0/gradle-1.5.0.pom'. Received status code 407 from server: Proxy Authentic ation Required
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 10.001 secs Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\gaurav-s\hello\p latforms\android\gradlew cdvBuildDebug -b C:\Users\gaurav-s\hello\platforms\andr oid\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
Upvotes: 0
Views: 784
Reputation: 416
http://services.gradle.org/distributions/gradle-2.14.1-all.zip
and extract it in any of directory and set the path by open cmd and enter
setx path (extracted direstory)/bin
after reopen cmd and check whether the gradle is works or not by give
gradle -v
it shows the gradle version output .
Now the error is fixed run
ionic build android
Upvotes: 0
Reputation: 3039
Build tools have been moved from maven to jcenter. Go to your gradle settings
file. Change
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
to
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
It is better to update your gradle to latest version.
Upvotes: 0