2017-09-08 138 views
0

這是不斷顯示錯誤:錯誤:執行失敗的任務 ':應用程序:processDebugGoogleServices'

Error:Execution failed for task ':app: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 9.2.0.

這是我的build.gradle文件:

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     compile "com.google.android.gms:play-services-gcm:9.2.0" 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.google.android.gms:play-services-gcm:11.0.0' 
    compile 'com.facebook.android:facebook-android-sdk:4.26.+' 
    compile 'com.android.support:appcompat-v7:26.0.2-alpha' 
    compile 'com.android.support:design:26.+' 
    compile 'com.google.firebase:firebase-auth:11.0.2' 
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7' 
    compile 'com.android.support:support-v4:26.+' 
    compile 'com.google.firebase:firebase-database:10.0.1' 
    testCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 

回答

0

error is because you are using different versions of play services make following changes

dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    compile "com.google.android.gms:play-services-gcm:11.0.0"<---- change 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.google.android.gms:play-services-gcm:11.0.0' 
compile 'com.facebook.android:facebook-android-sdk:4.26.+' 
compile 'com.android.support:appcompat-v7:26.0.2-alpha' 
compile 'com.android.support:design:26.+' 
compile 'com.google.firebase:firebase-auth:11.0.2' 
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7' 
compile 'com.android.support:support-v4:26.+' 
compile 'com.google.firebase:firebase-database:11.0.0'<----- change 
testCompile 'junit:junit:4.12' 
} 
相關問題