Korzystam z tego linku, aby zintegrować logowanie Google w mojej aplikacji na Androida. https://developers.google.com/identity/sign-in/android/start-integrating Jak podano w ostatnim kroku na podanej powyżej stronie musimy uwzględnić zależność
compile 'com.google.android.gms:play-services-auth:8.3.0'
w pliku build.gradle na poziomie aplikacji, ale robiąc to i budując projekt, pojawia się błąd
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict.
build.gradle (moduł: aplikacja)
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'
}
W pliku build.gradle wiersz zależności kompilacji compile 'com.google.android.gms:play-services-auth:8.3.0'pokazuje błąd
Wszystkie biblioteki com.google.android.gms muszą używać dokładnie tej samej specyfikacji wersji (mieszanie wersji może prowadzić do awarii środowiska wykonawczego). Znalezione wersje 8.3.0, 8.1.0. Przykłady obejmują com.google.android.gms: play-services-base: 8.3.0 i com.google.android.gms: play-services-measurement: 8.1.0 Istnieje kilka kombinacji bibliotek lub narzędzi i bibliotek, które są niekompatybilne lub mogą prowadzić do błędów. Jedną z takich niezgodności jest kompilowanie z wersją bibliotek obsługi systemu Android, która nie jest najnowszą wersją (lub w szczególności wersją niższą niż docelowa wersjaSdkVersion).
Oto wiadomości dotyczące budowania 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
Nie widzę żadnego wyjścia dla tego konfliktu wersji. Każda pomoc jest mile widziana.