Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
387 views
in Technique[技术] by (71.8m points)

android - Google Maps does not display any tiles, works fine in developer device

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...