이 링크를 따라 내 Android 앱에 Google 로그인을 통합하고 있습니다. https://developers.google.com/identity/sign-in/android/start-integrating 위의 주어진 페이지의 마지막 단계에서 제공된 것처럼 종속성을 포함해야합니다.
compile 'com.google.android.gms:play-services-auth:8.3.0'
앱 수준 build.gradle 파일에 있지만 그렇게하면 프로젝트를 빌드하면 오류가 발생합니다.
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 파일에서 컴파일 종속성 줄 compile 'com.google.android.gms:play-services-auth:8.3.0'에 오류가 표시됩니다.
모든 com.google.android.gms 라이브러리는 정확히 동일한 버전 사양을 사용해야합니다 (버전을 혼합하면 런타임 충돌이 발생할 수 있음). 8.3.0, 8.1.0 버전을 찾았습니다. 예를 들면 com.google.android.gms : play-services-base : 8.3.0 및 com.google.android.gms : play-services-measurement : 8.1.0이 포함됩니다. 호환되지 않거나 버그가 발생할 수 있습니다. 이러한 비 호환성 중 하나는 최신 버전 (또는 특히 targetSdkVersion보다 낮은 버전)이 아닌 Android 지원 라이브러리 버전으로 컴파일하는 것입니다.
다음은 gradle 빌드의 메시지입니다.
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
이 버전 충돌에 대한 탈출구를 볼 수 없습니다. 도움을 주시면 감사하겠습니다.