使用物理设备 运行 简单的 firebase flutter 应用程序并出现 gradle 错误

Using physical device to run simple firebase flutter app and getting gradle errors

Launching lib\main.dart on Redmi 5 Plus in debug mode...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "C:\user\proj\android\gradlew.bat" exited 
abnormally:
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be 
reused, use --status for details

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\user\proj\android\app\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
ASCII
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or -- 
debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
BUILD FAILED in 3m 22s
Command: C:\user\proj\android\gradlew.bat app:properties

Finished with error: Please review your Gradle project setup in the android/ 
folder.

但是如果我评论应用插件:'com.google.gms.google-services' in proj/app/build.gradle 它将完美运行,但 firebase 无法运行。

我希望你把所有的依赖都写在你的文件里 像 CHECK My Github file

您是否在正确的位置添加了 google-services.json? (应用级别 build.gradle)

此外,请检查您是否将这些作为项目级别的依赖项build.gradle

   classpath 'com.android.tools.build:gradle:3.2.1'
   classpath 'com.google.gms:google-services:4.2.0'