Search code examples
androidgoogle-mapsandroid-studiokotlingoogle-maps-android-api-2

Android Google Maps works on emulator but not on real device


I try to get working signed release apk to work on real device. I have created release certificate with release API key which I put in my release google_maps_api.xml file. In manifest I have:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="@string/google_maps_key"/>

When I generated signed release apk and install it and run in emulator maps loads and works but when I try to do the same on real device maps does not even load.


Solution

  • I found the solution. Now fingerprint of release certificate is useless. To get map working you need to go to Google Play Console -> choose app -> Release management -> App signing and use fingerprint from App signing certificate.