我使用Cordova 5.1.1
创建了一个Visual Studio 2015
项目。我是ntlm代理的幕后黑手。我在任何可以找到的地方添加了代理设置(Gradle,Java控制台,Crodova CLI等),并使用Cntlm
用于NPM
,但我仍然无法使构建工作。 Pre-Cordova 5我有几个使用Ant的版本。
构建失败,并显示以下错误:
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.
注意:我删除了完整路径,但它们位于原始构建输出中。
我注意到Maven
回购证书目前无效,但我不知道这是否相关,或者只是我们的代理没有传递证书的问题。
答案 0 :(得分:0)
不要忘记您应该设置常规http和https代理。
对我来说,这与您遇到的完全相同的错误有效。