I\'m using Google Maps v2 API in my project. In Google Maps v2 the debug/release API key is defined in AndroidManifest.xml. I have seen the link but in that map
For organizations that need to maintain separate keys, you can place them in separate directories in Android Studio. Make sure the subdirectory of src you use matches a flavor or buildType
From Building Your Project with Gradle:
To build each version of your app, the build system combines source code and resources from:
src/main/ - the main source directory (common to all variants)
src// - the build type source directory
src// - the flavor source directory
In projectroot/yourapp/build.gradle:
buildTypes {
debug {
runProguard false
debuggable true
}
release {
runProguard true
debuggable false
...
}
In projectroot/yourapp/src/main/AndroidManifest.xml:
...
...
In projectroot/yourapp/src/debug/AndroidManifest.xml, fully qualify the name of the app.
In projectroot/yourapp/src/release/AndroidManifest.xml: