Skip to content

Instantly share code, notes, and snippets.

Hiding API keys in local.properties

  1. Make sure your build directory is gitignored. It should be, by default, in a new Android Studio project -- you can double check by making sure that your .gitignore file contains the line:
/build
  1. In your project root directory, add the API key to local.properties file like this: