googlemapsv2 white screen

2019-02-21 02:27发布

问题:

I developed my first application Turkiye trafik Olayları.

My problem is that if I open my application in Eclipse with ether a real device or virtual device, Google maps v2 works perfectly. But if a user installs it, Google maps v2 appears only as a white screen. What could be the problem?

I can not find the problem because if I use debug with real device it works as expected (shows Google map).

回答1:

Make sure that you have added the correct credentials on the Google API console. Click the Edit allowed Android applications button and add the SHA1 and package name from your release keystore.

Chances are that you have setup credentials for your debug keystore so you can see the map while in development but there are no credentials for your release keystore. So when you make signed release builds the white screen shows instead of the map.

If you haven't already created a keystore for your release builds and retrieved the SHA1 you can learn how to do that from this question.



回答2:

That seems to be a probleam of Key used in your app googlemapsv2, are you using the debug certificate key because that should only work testing as you sayed its working fine for production distribution you need to replace that key with your release distribution signing certificate.