안드로이드에 구글 로그인 구현 중 에러가 났다.( 이글에서는 구현과정은 설명하지 않습니다!)
E/Firebase-Installations: Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.
와
Google sign in failed com.google.android.gms.common.api.ApiException 10
이런 에러가 계속 발생했습니다.
분명 firebase와 google에서 발급해준 client 키가 맞는데 왜 발생한것인지 의문이었다.
코드가 문제인가 싶어서 몇번이나 지웠다가 다시 작성해보고, aws로 서버를 구현할 것이라 firebase를 이용하지 않고 google로그인만 구현했다가, 이게 문제인건가 싶어서 firebase를 이용해서 새롭게 구현해봐도 같은 에러가 발생했다.
분명 안드로이드 스튜디오에서 sha-1을 확인해서 제대로 입력했는데 뭐가 문제인건지…
그러던 도중
https://stackoverflow.com/questions/61453640/android-error-when-communicating-with-the-firebase-installations-server-api
이 글을 보았고 app/build/generated/res/google-services를 삭제함으로써 해결했다.
client키가 빌드할때마다 업데이트가 안되었던것 같다.(이유는 모르겠다.)