title: PlatformException (PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null))
body: <p><strong>The line where is going to crash:</strong></p>
  
  <pre><code>GoogleSignInAccount googleUser = await _googleSignIn.signIn();
  </code></pre>
  
  <p><strong>What have I tried:</strong></p>
  
  <ol>
  <li>I've generated my SH1 key with this command <code>keytool -list -v \
  -alias androiddebugkey -keystore ~/.android/debug.keystore</code></li>
  <li>Adding SH1 encryption into console.firebase.google.com</li>
  <li>Re-downloading the google-service.json</li>
  <li>Copying the <code>debug.keystore</code> from <code>.android</code> to <code>MyProject/android</code></li>
  <li>Run in debug and release</li>
  <li><p>Adding into <code>android/build.gradle</code> those lines:</p>
  
  <ul>
  <li><strong>classpath 'com.android.tools.build:gradle:3.2.1'</strong></li>
  <li><strong>classpath 'com.google.gms:google-services:4.2.0'</strong></li>
  </ul></li>
  <li><p>Adding into <code>android/app/build.gradle</code> this lines:</p>
  
  <ul>
  <li><strong>implementation 'com.google.firebase:firebase-core:16.0.9'</strong> under <strong>dependencies</strong></li>
  <li><strong>apply plugin: 'com.google.gms.google-services'</strong> on the end of the file.</li>
  </ul></li>
  <li>Creating a file named <code>release-signing.properties</code> under my project folder with those lines in it.
  
  <ul>
  <li>storeFile=debug.keystore</li>
  <li>keyAlias=androiddebugkey</li>
  <li>storePassword=android</li>
  <li>keyPassword=android</li>
  </ul></li>
  </ol>
  
  <p>Also, I've searched in <strong>ALL StackOverflow</strong> question that I could found for this question, and none of them was useful for me.</p>
  
  <p><strong>My pubspec.yaml:</strong></p>
  
  <pre><code>firebase_core: ^0.4.0+1
  firebase_analytics: ^3.0.1
  
  cloud_firestore: ^0.11.0+2
  
  firebase_auth: ^0.11.1
  google_sign_in: ^4.0.1+3
  
  rxdart: ^0.22.0
  </code></pre>
  
  <p><strong>Auth class:</strong></p>
  
  <pre><code>class AuthService {
    final GoogleSignIn _googleSignIn = GoogleSignIn();
    final FirebaseAuth _auth = FirebaseAuth.instance;
    final Firestore _db = Firestore.instance;
  
    Observable&lt;FirebaseUser&gt; user;
    Observable&lt;Map&lt;String, dynamic&gt;&gt; profile;
    PublishSubject loading = PublishSubject();
  
    AuthService() {
      user = Observable(_auth.onAuthStateChanged);
      profile = user.switchMap((FirebaseUser user) {
        if (user != null) {
          return _db
              .collection('user')
              .document(user.uid)
              .snapshots()
              .map((snap) =&gt; snap.data);
        } else {
          return Observable.just({});
        }
      });
    }
  
    Future&lt;FirebaseUser&gt; googleSignIn() async {
      loading.add(true);
      GoogleSignInAccount googleUser = await _googleSignIn.signIn();
      GoogleSignInAuthentication googleAuth = await googleUser.authentication;
      // FirebaseUser user = await _auth.signInWithGoogle(
          // accessToken: googleAuth.accessToken, idToken: googleAuth.idToken);
      final AuthCredential credential = GoogleAuthProvider.getCredential(
        accessToken: googleAuth.accessToken,
        idToken: googleAuth.idToken,
      );
      FirebaseUser user = await _auth.signInWithCredential(credential);
      updateUserData(user);
      print("Sign in" + user.displayName);
  
      loading.add(false);
  
      return user;
    }
  }
  </code></pre>
  
  <p><strong>Main class:</strong></p>
  
  <pre><code>void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    AuthService authService = AuthService();
  
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blueGrey,
        ),
        home: Scaffold(
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: &lt;Widget&gt;[
                MaterialButton(
                  child: Text("Log in with Google"),
                  color: Colors.blueGrey,
                  textColor: Colors.deepOrange,
                  onPressed: () =&gt; authService.googleSignIn(),
                ),
                MaterialButton(
                  child: Text("LogOut"),
                  color: Colors.redAccent,
                  textColor: Colors.purple,
                  onPressed: () =&gt; authService.signOut(),
                ),
              ],
            ),
          ),
        ),
      );
    }
  }
  </code></pre>
  
  <p>Now if any of you could point me in the right direction I would be very grateful.</p>
  
  <p>Here are some stackoverflow links that I've tried already: </p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/53263246/google-sign-in-doesnt-work-after-release-of-flutter-app">Google sign in doesn&#39;t work after release of flutter app</a></li>
  <li><a href="https://stackoverflow.com/questions/54557479/flutter-and-google-sign-in-plugin-platformexceptionsign-in-failed-com-google">Flutter and google_sign_in plugin: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)</a></li>
  <li><a href="https://stackoverflow.com/questions/47632035/google-sign-in-error-12500">Google Sign In error 12500</a></li>
  </ol>
  
  <p>I didn't have luck with any of them, please let me know what do you think and how can I fix it.</p>