Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Google Play services are updating" in Google Maps API

I have an Android app which makes use of Google Maps. All of a sudden, it stopped working in release mode. The Map view tells Google Play services are updating on the emulator and on real devices. Searching on the net everyone talks about the API key file, but this is not my problem!

I have tried every possible different combination of release settings, and I have found out that the problem occurs when I set debuggable = false in the build configuration (with debuggable = true it works). I can't understand why Maps aren't working because, of course, the APK is not debuggable. I have also tried multiple versions of Google Play services, even the latest (10.2.0). No difference.

What can I do? Please help as I can't release any new release on Play Store until I fix this bug.

enter image description here

like image 951
Guido Lodetti Avatar asked Mar 06 '17 10:03

Guido Lodetti


People also ask

What does it mean when Google Play Services are updating?

Google Play Services let your Android apps connect to the internet and communicate with Google. Updating Google Play Services can fix app issues, and help your Android device run faster. If updating Google Play Services doesn't help, you can also clear its cache and data.

Does Google Maps need Google Play Services?

This makes it faster for your users to receive updates and easier for you to integrate the newest that Google has to offer. That means you need Google Play services to make Google Maps work.

How long does it take for Google Play Services to update?

Google Play typically checks for app updates once a day, so it can take up to 24 hours before an app update is added to the update queue.


1 Answers

"If I set debuggable to false it stops working"

This suggests your API access is restricted to debug mode. Considering there are not separate API keys for debug and release it would appear your key has been tied to your debug certificate.

To quote "More about API key restrictions" on the documentation:

You can optionally add a restriction. For Android apps, you restrict the key to your app's SHA-1 fingerprint

If you have such a restriction in place, the differing fingerprint of the release certificate will break your API access.

Take a look at the "Getting the certificate information yourself" section of the documentation linked above to get the correct (release) certificate fingerprint

like image 142
Nick Cardoso Avatar answered Oct 04 '22 16:10

Nick Cardoso