Repository: flutter
Issue: google sign in ^4.0.1+3 plugin: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) 
Labels: c: crash,platform-android,p: google_sign_in,package,P2,c: fatal crash,team-android,triaged-android

Configuration fix that seems to have helped many people: 
https://github.com/flutter/flutter/issues/33393#issuecomment-964728679 


## Details
After sigining in to google at this line (Android)  

`  GoogleSignInAccount googleUser = await _googleSignIn.signIn();`

I get this exception 

`PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)
`

I have tired all the advice from this issue https://github.com/flutter/flutter/issues/27599 including linking firebase and google account, adding SHA1 and SHA256 to firebase and changing the classpath to `com.android.tools.build:gradle:3.2.1/com.google.gms:google-services:4.2.0.` which threw build errors, after adding sub project script to fix, build errors was gone however sign in still did not function.

I also deleted my Android folder recreated the project and redid all the steps again. The error throw in both release and debug builds  

I believe I have migrated to AndriodX however it is hard to say with 100% certainty as the documentation is vague and Andriod studio tools said "no found issues". 
  
The error started after I move from the master channel to the stable channel. I move channels because the release built of my app was crashing on launch and I read that it could help solve the issue

I have been working on this problem for serval weeks so please help. 

From time to time I also get this build warning
```
Note: /Users/bradmurray/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+1/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
```



## Flutter DR

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
```

✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-AU)
    • Flutter version 1.5.4-hotfix.2 at /Users/bradmurray/Developer/flutter
    • Framework revision 7a4c33425d (4 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/bradmurray/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.2

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 35.3.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] Connected device
    ! No devices available


## Build Gradle
```
buildscript {
    repositories {
        google()
        jcenter()
        mavenLocal()
    }

    dependencies {
         classpath 'com.android.tools.build:gradle:3.3.1'
        classpath 'com.google.gms:google-services:4.2.0'
 
    
    }
   


}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
```

##Pub spec
```
environment:
  sdk: ">=2.0.0-dev.68.0 <3.0.0"

dependencies:
  flutter:
   sdk: flutter
  firebase_core: 
  firebase_database:
  cached_network_image:
  firebase_storage:
  location : ^2.3.0
  flutter_calendar_carousel: ^1.3.16
  carousel_pro: ^0.0.13
  shared_preferences: ^ 0.4.3
  url_launcher: ^4.2.0+3
  flutter_local_notifications: ^0.5.0
  after_layout: ^1.0.7
  geolocator: ^3.0.0
  google_sign_in: ^4.0.1+3
  firebase_auth: ^0.11.1
  font_awesome_flutter: ^8.4.0
  scoped_model: ^1.0.1
  google_maps_flutter:
   path: ../google_maps_flutter
  permission_handler: ^3.0.1
  cupertino_icons: ^0.1.2
```