问题描述
我下面这个链接,整合谷歌签署,在我的Android应用程序。的由于给出了上述特定网页上最后一步,我们必须包含相关
I am following this link to integrate Google sign-in in my android app.https://developers.google.com/identity/sign-in/android/start-integratingAs given in last step on the above given page we have to include dependency
compile 'com.google.android.gms:play-services-auth:8.3.0'
在应用级build.gradle文件,但这样做和建筑项目中的错误出现说
in app-level build.gradle file but doing so and building project an error comes saying
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict.
build.gradle(模块:应用程序)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.brainbreaker.socialbuttons"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.google.android.gms:play-services-auth:8.3.0'
}
在build.gradle文件编译依赖行编译com.google.android.gms:玩 - 服务 - 身份验证:8.3.0
显示误差
In the build.gradle file the compile dependency line compile 'com.google.android.gms:play-services-auth:8.3.0'
shows error
所有com.google.android.gms库必须使用完全相同的版本 规范(混合版本可能会导致运行时崩溃)。发现 版本8.3.0,8.1.0。例子包括 com.google.android.gms:播放服务基地:8.3.0和 com.google.android.gms:播放服务测量:8.1.0有一些 库,或工具和库的组合,是 不兼容,或者可能会导致错误。一个这样的不兼容是 一个版本的Android支持库的编译,是不是 比你的最新版本(或尤其,一个版本低 targetSdkVersion。)
下面是摇篮构建的消息。
Here are the messages of gradle build.
Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :social_buttons:generateDebugSources, :social_buttons:generateDebugAndroidTestSources, :social_buttons:compileDebugSources, :social_buttons:compileDebugAndroidTestSources]
:clean UP-TO-DATE
:app:clean
:social_buttons:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library
:app:prepareComAndroidSupportDesign2301Library
:app:prepareComAndroidSupportSupportV42301Library
:app:prepareComGoogleAndroidGmsPlayServicesAds810Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library
:app:prepareComGoogleAndroidGmsPlayServicesAuth830Library
:app:prepareComGoogleAndroidGmsPlayServicesBase830Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement830Library
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Found com.google.android.gms:play-services-auth:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services-auth:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services-auth:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services-auth:8.3.0, but version 8.1.0 is needed
Found com.google.android.gms:play-services-auth:8.3.0, but version 8.1.0 is needed
:app:processDebugGoogleServices FAILED
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict.
Information:BUILD FAILED
Information:Total time: 3.49 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
我无法看到任何出路,这个版本冲突。任何帮助是AP preciated。
I am not able to see any way out for this version conflict. Any help is appreciated.
推荐答案
我有同样的问题,并通过增加在项目级build.gradle的依赖以下行解决的:
I had the same issue and resolved it by adding the following line in the dependencies of the project-level build.gradle:
类路径com.google.gms:谷歌服务:1.5.0
对于一个完整的工作示例,请查看以下项目在GitHub上。
For a full working example, check out the following project on github.
希望这有助于:)
这篇关于摇篮错误:执行失败的任务“:应用程序:processDebugGoogleServices”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!