开发者

Android: Map displays on emulator(Version: Google APIs 2.1,level:7). But when uploaded into android mobile,it doesn't display

开发者 https://www.devze.com 2023-01-22 15:03 出处:网络
I have done one project in android which is to display map using GOOGLE API KEY. goto: [http://mobiforge.com/developing/story/using-google-maps-android]

I have done one project in android which is to display map using GOOGLE API KEY.

goto: [http://mobiforge.com/developing/story/using-google-maps-android]

I generated MAP API key for my system by following the procedure mentioned in above link correctly. It works well and displays map on EMULATOR.

I took a BUILD of my project and uploaded into my android M开发者_开发问答OBILE. Here Map DOESN'T display on my mobile. But all other functions work well.

Don't know what is the reason behind this problem :(

My AVD Version Details:

AVD Name: Google APIs(Google Inc.) Platform : 2.1 API Level: 7

My android Mobile Details:

It also supports GoogleAPI 2.1(Level 7) only. All other functionalities work well except displaying map.

(I am getting Polylines only)

My XML file looks:

<com.google.android.maps.MapView 
    android:id="@+id/mapView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:enabled="true"
    android:clickable="true"
    android:apiKey="0l4sCTTyRmXTNo7k8DREHvEaLar2UmHGwnhZVHQ"
    />

Can anyone help me to recover this problem?

Thanks in advance!


So while it's not really possible for us to know if you are using the correct key, remember that the Map API key is tied to the keystore that signed the apk. I suspect that on your emulator there is a debug keystore being used. This is the one that is probably used as you do your work day to day.

Before you can release your application, you have to make a release build. Which means signing it with a different keystore and you need that keystore's matching Map API Key.

Check this url out for more info, http://code.google.com/android/add-ons/google-apis/mapkey.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号