【发布时间】:2015-08-31 17:46:25
【问题描述】:
我使用Visual Studio 2015 创建了一个Cordova 5.1.1 项目。我在 ntlm 代理后面。我在我能找到的任何地方(Gradle、Java 控制台、Crodova CLI 等)添加了代理设置,并使用Cntlm 代替NPM,但我仍然无法让构建工作。在 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 repo 证书当前无效,但我不知道这是否相关或只是我们的代理未通过证书的一些问题。
【问题讨论】:
标签: android maven visual-studio-cordova