How to get a card on a signed Android application?

I created a map application. It shows the map without signing the APK, but while I try to sign and then install this APK on the device, the map no longer displays.

+3
source share
6 answers

Release requires a separate Google Maps API key. You say that you do not sign the APK when it is running, but the application is actually signed by your SDK automatically using the debug key. This is probably the one for which you have a valid Google Maps API key.

From the documentation at https://code.google.com/android/add-ons/google-apis/mapkey.html :

, , , - SDK . MapView API , . MD5 . , Google Maps API . MapView API.

+3

apiKey, release, . MD5, keytool -list -keystore c:\Users\Sudheesh\releasekey relesekey - , . MD5, api http://www.mobisoftinfotech.com/blog/android/android-mapview-generate-api-key-using-java-keytool/ apikey .

0

Select the project in workspace-->rightclick---> click export--->export android apps-->next-->next--->enter keystore file name--->next--->enter key alis--->finish

(. )

0

, RogerKK, /? Android, , , SHA-1. Release, .

, .

http://www.digitalopium.com/android-google-maps-api-tutorial/

0

, , nirav patel.

, -

public class MainActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        try

        {

            PackageInfo info = getPackageManager().getPackageInfo("Your package name here",PackageManager.GET_SIGNATURE);

            for (Signature signature : info.signatures)
            {
                MessageDigest md = MessageDigest.getInstance("SHA");
                md.update(signature.toByteArray());
                Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
            }
        } 
        catch (NameNotFoundException e)
        {
            System.out.println("name not found...."+e);
        } catch (NoSuchAlgorithmException e) 
        {
            System.out.println("NoSuchAlgorithmException...."+e);
        }
    }
}
0

All Articles