Complete BLoC with Clean Architecture (group chat) Discount !! E-commerce App With Backend Source Code Video and Voice Chatting App Firebase Chatting App Source Code Complete Gym App BLoC State Management Source Code Complete Study App Buy Ticket Booking App Source Code Buy Travel App With Backend Source Code Complete Chat App Udemy Course Special Offer Discount !! Online Learning Course App (BLoC) Online Learning Course App (Riverpod) Online Learning Course App (Getx) Discount !! Shopping App (Provider) Cool Flutter Game Nodejs Flutter Complete App
When you try to Google login on your Flutter app, you may get the error below
PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)
Based on my experience and experiment, there could at least
four reasons that you got this error
Enable Google Login
If you are using Firebase for google login and authentication, you have to register you app, with firebase. For registering, you need to create firebase projects and apps.
You need to enable Google login or login provider in the firebase console. Otherwise you won't be able to login.
Google Service json file
Make sure you have firebase app for Android and iOS. Once you create the project, you have to download the GoogleService-Info.plist for iOS and google-services.json for Android.
Make sure that, you have them ready in correct place. For iOS GoogleService-Info.plist should be inside
For Android make sure you have the file in below location
SHA1 & SHA256 Fingerprint
You need to create SHA1 & SHA256 fingerprint key for you app. To do it, you need to make sure you Java Key Tool installed in your machine.
Google Play Store
You need to make sure in your emulator you have Google play store installed. Otherwise you won't be able to login with Google service.
The above four steps if you do correctly, you won't have any problem. If first time, did not work make sure to
delete the app from emulator and redo again.