Gradle error with com.google.gms:google-services:4.3.2
See original GitHub issueHi,
I’m trying to test Firebase on Flutter and I did follow the instructions of the web site and I had the following error:
* Error running Gradle:
ProcessException: Process "....\firebase_test1\android\gradlew.bat" exited abnormally:
FAILURE: Build failed with an exception.
* Where:
Build file '...\firebase_test1\android\app\build.gradle' line: 24
Line 24 has this code: apply plugin: ‘com.android.application’
BTW, If I run Gradle directly from the command line threre is no error at all:
Welcome to Gradle 4.10.2.
To run a build, run gradlew <task> ...
To see a list of available tasks, run gradlew tasks
To see a list of command-line options, run gradlew --help
To see more detail about a task, run gradlew help --task <task>
For troubleshooting, visit https://help.gradle.org
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
If I change classpath ‘com.google.gms:google-services:4.3.2’ to classpath ‘com.google.gms:google-services:4.2.0’, the problem dissapears.
Version info
C:\flutter\bin\flutter.bat doctor --verbose [√] Flutter (Channel stable, v1.9.1+hotfix.4, on Microsoft Windows [Versión 10.0.17134.1006], locale es-ES) • Flutter version 1.9.1+hotfix.4 at C:\flutter • Framework revision cc949a8e8b (4 days ago), 2019-09-27 15:04:59 -0700 • Engine revision b863200c37 • Dart version 2.5.0
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at C:/Users/Ignacio/AppData/Local/Android/Sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 28.0.3 • ANDROID_HOME = C:/Users/Ignacio/AppData/Local/Android/Sdk • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03) • All Android licenses accepted.
[√] Android Studio (version 3.5) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 40.0.2 • Dart plugin version 191.8423 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code, 32-bit edition (version 1.35.1) • VS Code at C:\Program Files (x86)\Microsoft VS Code • Flutter extension version 3.1.0
[√] Connected device (1 available) • Pixel 2 XL • 711KPQJ0575612 • android-arm64 • Android 10 (API 29)
• No issues found! Process finished with exit code 0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:16 (2 by maintainers)
Top GitHub Comments
For me the following method worked and fixed the issue (on VSCode)
It is resolved,
I have upgraded from flutter_windows_v1.9.1+hotfix.6-stable to v1.12.13+hotfix.5 via flutter https://flutter.dev/docs/development/tools/sdk/upgrading
then, remove line: apply plugin: ‘com.google.gms.google-services’
open android studio, sync gradle and connect to firebase (tools\firebase\authentication\connect to firebase).
then you can return to vscode and run
add line: apply plugin: ‘com.google.gms.google-services’
flutter run succeed and google sign in works.