求教:vs2017 Cordova打包报错 Could not resolve com.android.to

图片说明

具体错误内容如下:

1>MSBUILD : cordova-build error : * What went wrong:
1>MSBUILD : cordova-build error : A problem occurred configuring root project 'android'.
1>MSBUILD : cordova-build error : > Could not resolve all dependencies for configuration ':classpath'.
1>MSBUILD : cordova-build error : > Could not resolve com.android.tools.build:gradle:2.1.0.
1>MSBUILD : cordova-build error : Required by:
1>MSBUILD : cordova-build error : :android:unspecified
1>MSBUILD : cordova-build error : > Could not resolve com.android.tools.build:gradle:2.1.0.
1>MSBUILD : cordova-build error : > Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
1>MSBUILD : cordova-build error : > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
1>MSBUILD : cordova-build error : > Received fatal alert: protocol_version
1>MSBUILD : cordova-build error : > Could not resolve com.android.tools.build:gradle:2.1.0.
1>MSBUILD : cordova-build error : > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
1>MSBUILD : cordova-build error : > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
1>MSBUILD : cordova-build error : > Remote host closed connection during handshake
1>MSBUILD : cordova-build error : * Try:
1>MSBUILD : cordova-build error : Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Command finished with error code 1: cmd /s /c ""D:\VSCODE\Long.Learun.Framework.7.0.2\Code\Learun.Framework V7.01 pro\Learun.Application.Mobile\platforms\android\gradlew.bat" cdvBuildDebug -b "D:\VSCODE\Long.Learun.Framework.7.0.2\Code\Learun.Framework V7.01 pro\Learun.Application.Mobile\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
1>MSBUILD : cordova-build error : Error: cmd: Command failed with exit code 1 Error output:

2个回答

wujie696
wujie696 这些地址都验证了,可以正常访问
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐