Google maps v2 is not displayed, although I generated with sha1 key and package in studio 2.2

when I test my application, it shows a map. But after I published in the game store, the map does not appear. Following this , you will create the SHA1 key. Then I generated a google maps API key with the package name and sha1 key. Then I inserted this key in google maps API.xml, but the map does not appear after publication. I'm new to android.any help

0
source share
1 answer

You can follow this tutorial . It is based on this documentation: Sign the application .

To create key stores for signing Android applications on the command line, use:

$ keytool -genkey -v -keystore my-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 

To create a debug repository, use:

 $ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 
  • Column Name: "debug.keystore"
  • Key password: "android"
  • Key Alias: "androiddebugkey"
  • Key password: "android"
  • CN: "CN = Android Debug, O = Android, C = US"

For your keystore, release the same as above, but choose the name, alias, and password that you prefer.

Another step is to use Android Studio to manually create signed APKs, either one at a time or for several build options at once.

To manually sign an APK for release in Android Studio, follow these steps:

  • In the menu bar, click Build> Generate Signed APK .
  • Select the module that you want to remove from the drop-down list, and click Next .
  • If you already have a keystore, go to step 5. If you want to create a new keystore, click Create New .
  • In the New Key Store window, specify the following information for your key store and key.

    • Keystore
      • The path to the keystore . Select the location where the keystore should be created.
      • Password Create and confirm a secure password for the keystore.
    • Key
      • Alias : Enter the identification name for your key.
      • Password Create and confirm a password for your key. This should be different from the password you selected for your keystore.
      • Validity (years) . Set the time period during which your key will be valid. Your key must be valid for at least 25 years, so you can sign application updates with the same key throughout the life of your application.
      • Certificate Enter some information about yourself for your certificate. This information is not displayed in your application, but is included in your certificate as part of the APK.

    Once you fill out the form, click OK .

  • In the Create Signature APK Wizard window, select the key store, the private key and enter the passwords for both. (If you created your keystore in the last step, these fields are already filled in for you.) Then click Next .

  • In the next window, select the destination for the signed APK (s), select the type of assembly, (if applicable) select the taste of the product (s) and click Finish .

When the process is complete, you will find your signed APK in the destination folder of your choice.

You can check the documentation for more information. Hope this helps!

0
source

Source: https://habr.com/ru/post/1260956/


All Articles