JetPro
JetPro

Reputation: 1054

Google Maps not showing on phone but works on emulator

I recently made an Android application using eclipse. It is working perfectly in my emulator.

But when I export my application using the Export Wizard on Eclipse it made outputs of .apk and certificate files, I copied it to my Android phone, but the map doesn't show, it only shows gray tiles.

It has a function of displaying a Toast with current Latitude and Longitude. It's displaying on my emulator, but not in my phone.

It also displays a Toast that checks if the device's GPS is active. It works both on my emulator and phone.

I don't know what's the problem of my application. Can anyone help me?

Upvotes: 1

Views: 1812

Answers (2)

Roman Rdgz
Roman Rdgz

Reputation: 13254

You are using a key intended for debug purposes only at the emulator: you need to ask Google for a unique key for your apps, and use it in order to use maps at your devices.

Upvotes: 0

Egor
Egor

Reputation: 40193

Probably the problem lays in different Maps API keys for different certificates. Remember, a Maps API key is based on a certificate, means you should have one based on your debug certificate - you'll use it for debugging, and one based on the release certificate. If you'll try to run the version of your application signed with the debug certificate on your device it should probably work. Hope this helps.

Upvotes: 1

Related Questions