任务“:app:processDebugGoogleServices”执行失败。在 android 构建期间

Execution failed for task ':app:processDebugGoogleServices'. during android build

我遇到了上面的错误,这很奇怪,因为我以前从来没有遇到过这个错误。另外,我没有使用 firebase,因为在错误研究期间,类似的问题与 fcm 插件有关。

这就是我得到的

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: /Users/tejashripatange/Documents/Project/ProjectName/platforms/android/app/src/nullnull/debug/google-services.json /Users/tejashripatange/Documents/Project/ProjectName/platforms/android/app/src/debug/nullnull/google-services.json /Users/tejashripatange/Documents/Project/ProjectName/platforms/android/app/src/nullnull/google-services.json /Users/tejashripatange/Documents/Project/ProjectName/platforms/android/app/src/debug/google-services.json /Users/tejashripatange/Documents/Project/ProjectName/platforms/android/app/src/nullnullDebug/google-services.json /Users/tejashripatange/Documents/Project/ProjectName/platforms/android/app/google-services.json

我认为,您正在使用某些 google 服务,例如推送通知示例。如果使用服务,您必须将 'google-service.json' 文件复制到您的项目路径以使用 google 服务。而且我认为您确实删除了平台并再次添加。所以删除了那个文件。并且您必须再次复制该文件或删除您的插件。