我是Visual Studio 2017的新手,我正试图从中创建cordova项目。因为我成功创建了示例cordova项目(没有任何插件)。 其次,我通过从https://github.com/cowbell/cordova-plugin-geofence.git添加geofence插件创建了一个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'. BUILD FAILED
总时间:6.5秒
1>MSBUILD : cordova-build error : > Could not resolve all dependencies for
configuration ':_debugCompile'.
1>MSBUILD : cordova-build error : > Could not find any matches for
com.google.android.gms:play-services-location:+ as no versions of
com.google.android.gms:play-services-location are available.
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-
location/maven-metadata.xml
1>MSBUILD : cordova-build error :
https://repo1.maven.org/maven2/com/google/android/gms/play-services-
location/
1>MSBUILD : cordova-build error :
https://jcenter.bintray.com/com/google/android/gms/play-services-
location/maven-metadata.xml
1>MSBUILD : cordova-build error :
https://jcenter.bintray.com/com/google/android/gms/play-services-location/
1>MSBUILD : cordova-build error
file:/C:/ProgramData/Microsoft/AndroidSDK/25/extras
/android/m2repository/com/google/android/gms/play-services-location/maven-
metadata.xml
1>MSBUILD : cordova-build error :
file:/C:/ProgramData/Microsoft/AndroidSDK/25/extras
/android/m2repository/com/google/android/gms/play-services-location/
1>MSBUILD : cordova-build error : Required by:
1>MSBUILD : cordova-build error : :android:unspecified
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
"C:\Users\kumar\source\repos\geoApp\GeoApp\platforms\android\gradlew.bat
cdvBuildDebug -b
C:\Users\kumar\source\repos\geoApp\GeoApp\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:
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 ':_debugCompile'.
1>MSBUILD : cordova-build error : > Could not find any matches for
com.google.android.gms:play-services-location:+ as no versions of
com.google.android.gms:play-services-location are available.
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-
location/maven-metadata.xml
1>MSBUILD : cordova-build error :
https://repo1.maven.org/maven2/com/google/android/gms/play-services-
location/
1>MSBUILD : cordova-build error :
https://jcenter.bintray.com/com/google/android/gms/play-services-
location/maven-metadata.xml
1>MSBUILD : cordova-build error :
https://jcenter.bintray.com/com/google/android/gms/play-services-location/
1>MSBUILD : cordova-build error :
file:/C:/ProgramData/Microsoft/AndroidSDK/25/extras/android
/m2repository/com/google/android/gms/play-services-location/maven-
metadata.xml
1>MSBUILD : cordova-build error :
file:/C:/ProgramData/Microsoft/AndroidSDK/25/extras/android
/m2repository/com/google/android/gms/play-services-location/
1>MSBUILD : cordova-build error : Required by:
1>MSBUILD : cordova-build error : :android:unspecified
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.
1>MSBUILD : cordova-build error : Picked up _JAVA_OPTIONS: -Xmx512M
1>Done building project "GeoApp.jsproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
我也已经在sdk管理器(android studio)中安装了以下软件包
Google Play服务
Android支持存储库
Google存储库
任何帮助将不胜感激。
谢谢