1. Locate your keystore file:
For debugging you should use the debug keystore file located in:
C:\Users\USER_NAME_HERE\.android\debug.keystore
For release version you should use the generated keystore
(the same one that you use when you'll sign your applicatoin for distrebution)
2. Execute command (cmd) and extract SHA1 string:
For debug:
keytool -v -list -alias androiddebugkey -keystore
YOUR_DEBUG_KEYSTORE_FILE_PATH_HERE -storepass android
-keypass android
For release:
keytool -v -list -alias YOUR_ALIAS_HERE -keystore
YOUR_KEYSTORE_FILE_PATH_HERE -storepass YOUR_GENERAL_PASSWORD_HERE
-keypass YOUR_ALIAS_PASSWORD_HERE
3. Open
https://code.google.com/apis/console/
4. Go to services.
5. Enable google maps V2.
6. Go to API access menu item.
7. Press on "Create new Android key".
8. Paste your sha1 code with the application package:
(e.g. 40:DC:19:FF:11:33:B9:61:64:54:79:7A:84:5C:C8:F8:AF:CC:FC:1C;
com.company.appname)
9. Copy your API key from the Simple API Access
(should look like : AIzzSyACccKZeD-4lmBrtZI0JSrxBOAMnK1oEIk).
10. Paste your API key in your AndroidManifest.xml file:
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzzSyACccKZeD-4lmBrtZI0JSrxBOAMnK1oEIk"/>