Google Maps does not display any tiles, works fine

2020-02-07 08:33发布

I developed an Android application with Google Maps. Maps work fine when I checked with my device, or even emulator. But when I delivered it to client he says only "no tiles displaying, just grid lines and Google logo at bottom left". What could be wrong?

1条回答
家丑人穷心不美
2楼-- · 2020-02-07 09:05

That's because you haven't got the right API KEY for the Google maps widget.

When you sign the application, you have to use the same keystore and obtain an API key. You get the MD5 fingerprint of the keystore you are using to sign the application go here, http://code.google.com/android/maps-api-signup.html put the finger print and get the API key, then in your maps widget,

<?xml version="1.0" encoding="utf-8"?>
    <com.google.android.maps.MapView
        android:id="@+id/mapView" android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:apiKey="0G0LHKCCJvhmNvdpZijAqg76V63Cs6DTBbq2-Pw"
        android:enabled="true" android:clickable="true" />

put the api_key

查看更多
登录 后发表回答