【发布时间】:2015-12-22 08:32:58
【问题描述】:
添加后,Cordova GCM push plugins 我的构建遇到了一些问题,并确实解决了这个问题,如thread 所示。
最近,构建又开始失败了,除了这个例外:
Found com.google.android.gms:play-services-location:+, but version 8.3.0 is needed for the google-services plugin.
:processDebugGoogleServices FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 8.3.0.
我认为,这来自build.gradle 文件中的以下platform/android@
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile project(path: "CordovaLib", configuration: "debug")
releaseCompile project(path: "CordovaLib", configuration: "release")
compile "com.facebook.android:facebook-android-sdk:4.+"
compile "com.google.android.gms:play-services-location:+" // This line in particular
// SUB-PROJECT DEPENDENCIES END
}
无法直接编辑这个文件,所以我创建了一个build-extras.gradle文件:
configurations.all{
resolutionStrategy{
force ("com.google.android.gms:play-services-location:8.3.0")
}
}
但我无法解决它。我仍然收到与上述相同的错误。
Google 在8.3 release notes 中指定了一个与此类似的错误。如上所述,我已经指定了版本,更新了我的构建工具,播放了服务 repo。
【问题讨论】:
标签: android cordova gradle google-cloud-messaging