close

這是我在做 google sign in 功能時遇到的錯誤
完整的訊息為

 

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.0.0.

 

主要原因是這裡

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

這裡是我們的 build.gradle ( app-level ) 的開頭
在加入 google plugin 的時候我們總會習慣放在一起
而問題就出在這

apply plugin: 'com.google.gms.google-services

只要把上面這一行移到 檔案的最下方即可
(謎之聲:官網不是都有寫嗎)

資料來原:
https://developers.google.com/android/guides/google-services-plugin


 


arrow
arrow

    顏澤偉 發表在 痞客邦 留言(0) 人氣()