Google map can be displayed on emulator but not in Android Device

后端 未结 2 1051
说谎
说谎 2021-01-18 07:51

I already get the Google map API key to run on the emulator, but when I run the program on real android device, the Map doesn\'t show up. I\'ve

相关标签:
2条回答
  • 2021-01-18 08:26

    Generate a new key-store , get a Api key again and use the new key.

    0 讨论(0)
  • 2021-01-18 08:30

    It is not only about the Android app keystore or the Android Maps API Key. It is a combination of both. We need the keystore when we want to sign a App.

    The way you can sign a App is as follow; (I am giving instructions by assuming that you are working with Eclipse IDE)

    • Right click on your project in the Package Explorer window
    • Android Tools -> Export signed application package
    • In Project Checks window, brows your project and go to next window
    • There, select "Create new keystore" and follow the wizard
    • Don't give the default password which comes with the Eclipse debug key

    Then you can finish creating a signed key for your app. Next procedure is Android Maps API Key Signup process. Here I am assume that you are doing implementation in a Windows environment

    • Open command prompt
    • Go to the place where you have saved your keystore file in previous process
    • Give the command "keytool -list -keystore keystore.filename" with out quotes
    • They will ask "keystore password", provide the same password given in creating the keystore
    • Then you can get a MD5 key
    • Copy it and go this link

    Give the MD5 key on the appropriate place, provide the tick. Then the Google people will provide you a XML code. You have to insert that code in the XML file where you need to load the map.

    Bingo... now you have created an App which support Google map API that runs on a emulator as well as real device. :-)

    0 讨论(0)
提交回复
热议问题