在你的專案中整合 google Auth。 (獲取配置檔案)
首先從中獲取登入配置檔案
開啟下面的連結
[ https://developers.google.com/identity/sign-in/android/start-integrating] [1 ]
點選獲取配置檔案
- 輸入應用程式名稱和包名稱,然後單擊選擇和配置服務
- 提供 SHA1 啟用谷歌 SIGNIN 並生成配置檔案
下載配置檔案並將檔案放在專案的 app /資料夾中
- 將依賴項新增到專案級 build.gradle:
classpath’com.google.gms:google-services:3.0.0'
- 將外掛新增到你的應用級 build.gradle :(下)
申請外掛:‘com.google.gms.google-services’
- 將此依賴項新增到你的應用程式 gradle 檔案
依賴項{compile’com.google.android.gms:play-services-auth:9.8.0'}