Android: automatically choose debug/release Maps v2 api key?
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 key is defined in a xml layout file not in AndroidManifest.xml . So can I define both debug and release keys for my project in AndroidManifest.xml ? I want something like this in AndroidManifest.xml : If debug mode: <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="@string/debug_map_api_key"/> If release mode: <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="@string/release_map_api