【发布时间】:2022-01-07 13:33:46
【问题描述】:
我已将 google-services.json 文件放在以下路径中
但我得到了错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
F:\downloads\food_delivery_app-master\food_delivery_app-master\android\app\src\debug\google-services.json
F:\downloads\food_delivery_app-master\food_delivery_app-master\android\app\src\google-services.json
F:\downloads\food_delivery_app-master\food_delivery_app-master\android\app\google-services.json
* 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 25s
Exception: Gradle task assembleDebug failed with exit code 1
我搜索了所有发布的解决方案。但没有一个奏效。我该如何解决这个问题?请帮助已经有一段时间了。谢谢。
【问题讨论】:
-
试试
flutter clean,同时检查this -
是我,还是文件名中有多余的空格?是
google-services .json,但应该是google-services.json。 -
@DarjaOrlova 我也看到了。我检查了 VS Code,似乎是这种情况。
-
你能显示你初始化 Firebase 的地方吗?并尝试清除 IDE for android 的缓存 - 使缓存无效并重新启动。
-
我在android/app级别的gradle文件中添加了
apply plugin: 'com.google.gms.google-services'。