在将默认的Flutter应用程序与Firebase集成后,我尝试构建该应用程序时遇到了此错误。
我已将googleservices.json放在正确的位置。现在它说正在搜索不存在的位置。
src\debug\nullnull\google- services.json
这个文件夹甚至不存在,我已经查过了,它没有出现。
Launching lib\main.dart on Phone in debug mode...
Configuration 'compile' in project ':app' is deprecated. Use
'implementation' instead.
registerResGeneratingTask is deprecated, use
registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use
registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
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:
C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnull\debug\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\src\debug\nullnull\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnull\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\src\debug\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\android\app\src\nullnullDebug\google-
services.json
C:\Users\rober\Documents\VS\APPNAME\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.
* Get more help at https://help.gradle.org
BUILD FAILED in 8s
Gradle build failed: 1
Exited (sigterm)
src/main
和src/debug
源集中。 - Martin Zeitlerandroid/app/src
目录中。 然而,它实际上应该位于android/app
目录中! - guivho