I created a Cordova 5.1.1
project using Visual Studio 2015
. I am behind an ntlm proxy. I added the proxy settings anywhere I could find (Gradle, Java console, Crodova CLI, etc.) and use Cntlm
for NPM
but I still can't get the build to work. Pre-Cordova 5 I had several builds working with Ant.
The build fails with the following error:
FAILURE: Build failed with an exception.
1>
1> * What went wrong:
1> A problem occurred configuring root project 'android'.
1> > Could not resolve all dependencies for configuration ':classpath'.
1> > Could not resolve com.android.tools.build:gradle:1.0.0+.
1> Required by:
1> :android:unspecified
1> > Failed to list versions for com.android.tools.build:gradle.
1> > Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml.
1> > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml'.
1> > peer not authenticated
1>
1> * Try:
1> Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
1>
1> BUILD FAILED
1>
1> Total time: 2.389 secs
1>
1> platforms\android\cordova\node_modules\q\q.js:126
1> throw e;
1> ^
1> Error code 1 for command: cmd with args: /s /c ""platforms\android\gradlew" cdvBuildDebug -b "platforms\android\build.gradle" -Dorg.gradle.daemon=true"
1> Command finished with error code 1: cmd /s /c ""platforms\android\cordova\build.bat" --debug "--buildConfig=\build.json""
1>ERROR building one of the platforms : error : cmd: Command failed with exit code 1
1> You may not have the required environment or OS to build this project
1>MDAVSCLI : error : cmd: Command failed with exit code 1
1>
1>Build FAILED.
Note: I have removed the full paths, but they are there in the original build output.
I noticed that the Maven
repo certificate is not currently valid, but I have no idea if this is relevant or just some issue with our proxy not passing certificates.