Hiding API keys in local.properties Add the API key to your local.properties file: apiKey=<value> Add to the root level of your app-level build.gradle file: