Google-services.json file missing error when running my build

I’m new to circle CI and I’m trying to get my Android project running UNIT TESTS with my CircleCI. I’m getting this error, as I haven’t commited my google-services.json, which is an API key which I’m not allowed to upload to public repository. What should I do?

#!/bin/bash -eo pipefail
./gradlew lint test
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar
:app:mainApkListPersistenceDebug
:app:generateDebugResValues
:app:generateDebugResources
:app:processDebugGoogleServices FAILED

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:
/home/circleci/code/app/src/nullnull/debug/google-services.json
/home/circleci/code/app/src/debug/nullnull/google-services.json
/home/circleci/code/app/src/nullnull/google-services.json
/home/circleci/code/app/src/debug/google-services.json
/home/circleci/code/app/src/nullnullDebug/google-services.json
/home/circleci/code/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 1s
9 actionable tasks: 9 executed
Exited with code 1

(When presenting logs here, please format them in Markdown, so they are readable, and so they do not produce unexpected formatting artefacts. You can do this now by editing the post and re-saving it. Simply click edit, select the logs, click the code button in the toolbar (</>) and then save.)

Did you ever fix this issue?

I have a project with 4 flavors and 3 of the flavors work fine, but the last gives me the exact same error message as you get.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.