I have an android app in which I am using Google Maps API for Android v2. It was working fine in my phone until I upgraded my phone to Marshmallow. After updating my phone o
I was facing same problem after changing the system and project config.
Try these steps:
Goto File > Settings > Gradle. Deselect Offline Work if it's checked.Then confirm if you have latest version of google services mentioned as dependencies in project level build.gradle:
classpath 'com.google.gms:google-services:2.1.0'.
You can find latest version here: https://jcenter.bintray.com/com/android/tools/build/gradle/
Clean and build the project after the gradle sync completes.
These steps solved the issue for me.
In case you've changed the system used for building this app, make sure to update the SHA1 in your project on Google Developer Console and update the Maps API key in your android project.