My Android app works fine on device without signing but Once I export signed apk file maps no more render Do we need to create new API key for release even with V2 if yes please suggest any link that I should follow to create release API key
You don't need a separate API key for your release signing key. The only thing you need to do, is adding SHA of release key on APIs Console, so you have two lines there instead of one:
D3:49:EF:3D:0E:...:D5:5F:59:46:11:C1:85;pl.mg6.android.maps.extensions.demo
C1:3A:96:3E:F8:...:4D:F1:52:77:D0:01:0E;pl.mg6.android.maps.extensions.demo
@MaciejGórski is correct. Below is small details to it.
In the Google Api console, where we have created the API KEY we have an option to add multiple finger prints to the same key. What I did was adding two SHA1 finger print for my debug keystore and release keystore and the same API key worked for me.
Note the below is for Ubuntu specifically:
Get SHA1 for the debug using the below command
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
For getting SHA1 for release the command changes to
keytool -list -v -keystore /home/atul/Desktop/Learnings/Projects/TestApp/keystore.jks -alias test -storepass password -keypass password
where
/home/atul/Desktop/Learnings/Projects/TestApp/keystore.jks
is the path where my keystore file for the signed apk is present
test
is the key alias name used while genrating the signed key store
and password
is the password used while signing the apk
Hope this helps. Happy coding :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With