Cordova:无法编译代码 - 找不到与谷歌播放服务相匹配的任何版本

时间:2017-11-07 20:07:19

标签: android cordova google-play-services visual-studio-cordova

我使用最新版本的Visual Studio 2017和Cordova 6.3.1使用Google Play服务编译cordova项目。 它几天前编译得很好,但现在却抛出了错误:

1>MSBUILD : cordova-build error : FAILURE: Build failed with an exception.
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 ':_armv7DebugCompile'.
1>MSBUILD : cordova-build error :  > Could not find any version that matches com.google.android.gms:play-services-maps:+.
1>MSBUILD : cordova-build error :  Searched in the following locations:
1>MSBUILD : cordova-build error :  https://repo1.maven.org/maven2/com/google/android/gms/play-services-maps/maven-metadata.xml
1>MSBUILD : cordova-build error :  https://repo1.maven.org/maven2/com/google/android/gms/play-services-maps/
1>MSBUILD : cordova-build error :  https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/google/android/gms/play-services-maps/maven-metadata.xml
1>MSBUILD : cordova-build error :  https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/google/android/gms/play-services-maps/
1>MSBUILD : cordova-build error :  file:/C:/ProgramData/Microsoft/AndroidSDK/25/extras/android/m2repository/com/google/android/gms/play-services-maps/maven-metadata.xml
1>MSBUILD : cordova-build error :  file:/C:/ProgramData/Microsoft/AndroidSDK/25/extras/android/m2repository/com/google/android/gms/play-services-maps/
1>MSBUILD : cordova-build error :  Required by:
1>MSBUILD : cordova-build error :  :android:unspecified

和不同的Google Play服务相同。

我已经尝试从Android SDK Manager重新安装Android支持存储库,Google Play服务和Google Repository,但没有成功。

在这种情况下,有人可以帮助我吗?提前谢谢。

1 个答案:

答案 0 :(得分:0)

经过各种尝试后我发现,由于自动链接,https丢失了。正确的答案是,正如@Gabriele Mariotti所说 - maven {url" https://maven.google.com" } - 网址以https开头。