Question

I'm trying to develop a Google Maps V2 based application with android studio on my mac computer. It is working fine while debugging. I've created a map and added a lot of markers, polygons and polylines on it. Looks great! I'm using real device not an emulator. Real device connected to my computer via USB cable.

But, If I created an APK file with Android Studio and copy this APK file to real device, my application showing only gray tiles.

I've made too many searches but I couldn't find any solution.

Please help.

Problem solved. Thanks to HAR My mistake was using wrong keystore file. When I use right myapp.jks file problem solved.

Was it helpful?

Solution

The key you obtained and entered in the api console is for debugging purposes. You have to obtain sha1 key for the apk file from the Keystore file which you are using to digitally sign the apk

Procedure for obtaining SHA1 key for release mode

1) Go to the location where you have your 'keystore' file which you are using for digitally signing your application.

2) Open command window in that location. This can be done by 'shift+rightClick' and selecting the option 'Open Command Window here'

3) Use the following Command

keytool –v –list –keystore <name> -alias <aliasname>

where name- your keystore filename , aliasname - the alias name for the app

4) Then enter your keystore password

5) you will then get your sha1 keys along with other information. Use the key in the api console.

OTHER TIPS

Use Keytool binary or exe to generate a private keystore. Instructions here. You can then sign your app using this keystore. Keytool gets installed when you install Java.

Test sign apk on your real device

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top