添加上述插件后,编译失败,告警信息如下: * What went wrong: A problem occurred configuring root project 'android'. BUILD FAILED> Could not resolve all dependencies for configuration ':_debugCompile'. Total time: 2.629 secs > Could not resolve com.google.android.gms:play-services-location:+. Required by: :android:unspecified > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. ERROR building one of the platforms: Error: cmd: Command failed with exit code 1 You may not have the required environment or OS to build this project D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\cordova\node_modules\q\q.js:126 throw e; ^ Error code 1 for command: cmd with args: /s /c "D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\gradlew cdvBuildDebug -b D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline" Error: cmd: Command failed with exit code 1****ERROR****: 子任务 "exec" 执行失败。****ERROR****: 任务 "buildAndroid" 执行失败。****ERROR****: 执行出错:****ERROR****: 错误信息: exec returned: 1****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
请帮忙分析一下如何解决,谢谢!
应该不是这个原因,我开了vpn后能访问google了。但仍然出现了如下错误:生成android应用包: Running command: cmd "/s /c "D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\cordova\build.bat --debug"" ANDROID_HOME=D:\WeX5_V3.5\tools\adt-sdk JAVA_HOME=D:\WeX5_V3.5\java\jre1.8 Running: D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\gradlew cdvBuildDebug -b D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true Incremental java compilation is an incubating feature. FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'android'. BUILD FAILED> Could not resolve all dependencies for configuration ':_debugCompile'. Total time: 6.655 secs > 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. Searched in the following locations: file:/D:/WeX5_V3.5/tools/maven/repo/com/google/android/gms/play-services-location/maven-metadata.xml file:/D:/WeX5_V3.5/tools/maven/repo/com/google/android/gms/play-services-location/ https://repo1.maven.org/maven2/c ... /maven-metadata.xmlhttps://repo1.maven.org/maven2/c ... -services-location/ file:/D:/WeX5_V3.5/tools/adt-sdk/extras/android/m2repository/com/google/android/gms/play-services-location/maven-metadata.xml file:/D:/WeX5_V3.5/tools/adt-sdk/extras/android/m2repository/com/google/android/gms/play-services-location/ Required by: :android:unspecified * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\cordova\node_modules\q\q.js:126 throw e; ^ Error code 1 for command: cmd with args: /s /c "D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\gradlew cdvBuildDebug -b D:\WeX5_V3.5\model\Native\test1\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true" ERROR building one of the platforms: Error: cmd: Command failed with exit code 1 You may not have the required environment or OS to build this project Error: cmd: Command failed with exit code 1****ERROR****: 子任务 "exec" 执行失败。****ERROR****: 任务 "buildAndroid" 执行失败。****ERROR****: 执行出错:****ERROR****: 错误信息: exec returned: 1****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
====================================分割线===========================================================================
插件的介绍中有如下说明:Setup:
Make sure you have Google Play Services AND Google Repository installed via your android-sdk manager prior to building your application with this. It will be under the extras part of the sdk manager. More information can be found here:http://developer.android.com/sdk/installing/adding-packages.html.
这个问题高了一天找到原因了,但怎么解决还得需要X5帮助一下:
请先看下这个连接:https://github.com/EddyVerbrugge ... oogleplus/issues/77
解决方法:You need to have Android Support Repository and Android Support Library installed in the Android SDK manager. This worked for me.
但是weX5配套的Android SDK怎么添加库,需要指导一下,谢谢!