0

I've been struggling for weeks with an issue with displaying a simple map fragment in my app. I followed all Google steps so I think my code is correct.

Then I saw this line in the Google comments :

You can define the keys for the debug and release targets in src/debug/ and src/release/.

I switched my IDE tree from Android to Project to see the release and debug paths and I created a new API key, restricted carrefully.

Now the issue is : how can I force android studio to take the release key first in my manifest ?

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

Buidling my gradle file is always using the debug key so when I upload a release on app store, map isn't showing. Im pretty sure the problem comes from here.

I also tried to enter directly the key in the manifest but when I build for release it puts the "@string/google_maps_key" again.

Antoine Berger
  • 85
  • 1
  • 10
  • 1
    https://stackoverflow.com/questions/30559602/android-studio-google-map-still-blank-on-real-android-device-on-release-apk/30559898 – Daniel Nugent Jul 30 '20 at 16:27
  • Thank you so much.. I found the issue going to the developper console and changing the SHA1 of my restriction, which for some some reasons is different from the SHA1 I get in my app – Antoine Berger Jul 30 '20 at 17:15

0 Answers0