Ensure that the “Google Maps Android API v2” is enabled. Even if already enabled












0















Im working on an Android application that includes the Google Maps API. To do that, I enabled this API from console developers



Maps SDK for Android


I created a credential, I set a restriction for App Android , I added the package of the app and the fingerprint as well and, on the API restriction tab, I selected Maps SDK for Android.
After that, in my application manifest, I wrote the key for google maps. When i build the app from Android studio everything is fine (my phone, one plus 6, is plugged on the pc). The map works as I want. But, if I try to install the generated APK (a signed APK from build -> Generate signed bundle/APK) the map not shows up and i get an error on logcat



2018-11-15 10:19:45.590 13249-13249/? I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
2018-11-15 10:19:45.590 13249-13249/? I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
2018-11-15 10:19:45.652 13249-13249/? I/Google Maps Android API: Google Play services client version: 12451000
2018-11-15 10:19:45.655 13249-13249/? I/Google Maps Android API: Google Play services package version: 14367037
2018-11-15 10:19:45.985 633-13359/? I/netd: ;; res_nquery(maps.googleapis.com, 1, 1)
2018-11-15 10:19:46.162 13249-13358/? W/System.err: com.google.maps.errors.RequestDeniedException: This IP, site or mobile application is not authorized to use this API key. Request received from IP address *********, with empty referer
2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.DirectionsApi$Response.getError(DirectionsApi.java:90)
2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.internal.OkHttpPendingResult.parseResponse(OkHttpPendingResult.java:289)
2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.internal.OkHttpPendingResult.onResponse(OkHttpPendingResult.java:207)
2018-11-15 10:19:46.250 13249-13356/? E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
2018-11-15 10:19:46.251 13249-13356/? E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)
Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:
API Key: YOUR_KEY_HERE
Android Application (<cert_fingerprint>;<package_name>): *********;************


I can see 2 problems here:



This IP, site or mobile application is not authorized to use this API


and



Ensure that the "Google Maps Android API v2" is enabled


I really don't understand. Actually, I can't figure it out. I enabled everything and still not working. Is there something else to do?










share|improve this question



























    0















    Im working on an Android application that includes the Google Maps API. To do that, I enabled this API from console developers



    Maps SDK for Android


    I created a credential, I set a restriction for App Android , I added the package of the app and the fingerprint as well and, on the API restriction tab, I selected Maps SDK for Android.
    After that, in my application manifest, I wrote the key for google maps. When i build the app from Android studio everything is fine (my phone, one plus 6, is plugged on the pc). The map works as I want. But, if I try to install the generated APK (a signed APK from build -> Generate signed bundle/APK) the map not shows up and i get an error on logcat



    2018-11-15 10:19:45.590 13249-13249/? I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
    2018-11-15 10:19:45.590 13249-13249/? I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
    2018-11-15 10:19:45.652 13249-13249/? I/Google Maps Android API: Google Play services client version: 12451000
    2018-11-15 10:19:45.655 13249-13249/? I/Google Maps Android API: Google Play services package version: 14367037
    2018-11-15 10:19:45.985 633-13359/? I/netd: ;; res_nquery(maps.googleapis.com, 1, 1)
    2018-11-15 10:19:46.162 13249-13358/? W/System.err: com.google.maps.errors.RequestDeniedException: This IP, site or mobile application is not authorized to use this API key. Request received from IP address *********, with empty referer
    2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.DirectionsApi$Response.getError(DirectionsApi.java:90)
    2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.internal.OkHttpPendingResult.parseResponse(OkHttpPendingResult.java:289)
    2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.internal.OkHttpPendingResult.onResponse(OkHttpPendingResult.java:207)
    2018-11-15 10:19:46.250 13249-13356/? E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
    2018-11-15 10:19:46.251 13249-13356/? E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)
    Ensure that the "Google Maps Android API v2" is enabled.
    Ensure that the following Android Key exists:
    API Key: YOUR_KEY_HERE
    Android Application (<cert_fingerprint>;<package_name>): *********;************


    I can see 2 problems here:



    This IP, site or mobile application is not authorized to use this API


    and



    Ensure that the "Google Maps Android API v2" is enabled


    I really don't understand. Actually, I can't figure it out. I enabled everything and still not working. Is there something else to do?










    share|improve this question

























      0












      0








      0








      Im working on an Android application that includes the Google Maps API. To do that, I enabled this API from console developers



      Maps SDK for Android


      I created a credential, I set a restriction for App Android , I added the package of the app and the fingerprint as well and, on the API restriction tab, I selected Maps SDK for Android.
      After that, in my application manifest, I wrote the key for google maps. When i build the app from Android studio everything is fine (my phone, one plus 6, is plugged on the pc). The map works as I want. But, if I try to install the generated APK (a signed APK from build -> Generate signed bundle/APK) the map not shows up and i get an error on logcat



      2018-11-15 10:19:45.590 13249-13249/? I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
      2018-11-15 10:19:45.590 13249-13249/? I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
      2018-11-15 10:19:45.652 13249-13249/? I/Google Maps Android API: Google Play services client version: 12451000
      2018-11-15 10:19:45.655 13249-13249/? I/Google Maps Android API: Google Play services package version: 14367037
      2018-11-15 10:19:45.985 633-13359/? I/netd: ;; res_nquery(maps.googleapis.com, 1, 1)
      2018-11-15 10:19:46.162 13249-13358/? W/System.err: com.google.maps.errors.RequestDeniedException: This IP, site or mobile application is not authorized to use this API key. Request received from IP address *********, with empty referer
      2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.DirectionsApi$Response.getError(DirectionsApi.java:90)
      2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.internal.OkHttpPendingResult.parseResponse(OkHttpPendingResult.java:289)
      2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.internal.OkHttpPendingResult.onResponse(OkHttpPendingResult.java:207)
      2018-11-15 10:19:46.250 13249-13356/? E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
      2018-11-15 10:19:46.251 13249-13356/? E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)
      Ensure that the "Google Maps Android API v2" is enabled.
      Ensure that the following Android Key exists:
      API Key: YOUR_KEY_HERE
      Android Application (<cert_fingerprint>;<package_name>): *********;************


      I can see 2 problems here:



      This IP, site or mobile application is not authorized to use this API


      and



      Ensure that the "Google Maps Android API v2" is enabled


      I really don't understand. Actually, I can't figure it out. I enabled everything and still not working. Is there something else to do?










      share|improve this question














      Im working on an Android application that includes the Google Maps API. To do that, I enabled this API from console developers



      Maps SDK for Android


      I created a credential, I set a restriction for App Android , I added the package of the app and the fingerprint as well and, on the API restriction tab, I selected Maps SDK for Android.
      After that, in my application manifest, I wrote the key for google maps. When i build the app from Android studio everything is fine (my phone, one plus 6, is plugged on the pc). The map works as I want. But, if I try to install the generated APK (a signed APK from build -> Generate signed bundle/APK) the map not shows up and i get an error on logcat



      2018-11-15 10:19:45.590 13249-13249/? I/DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
      2018-11-15 10:19:45.590 13249-13249/? I/DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
      2018-11-15 10:19:45.652 13249-13249/? I/Google Maps Android API: Google Play services client version: 12451000
      2018-11-15 10:19:45.655 13249-13249/? I/Google Maps Android API: Google Play services package version: 14367037
      2018-11-15 10:19:45.985 633-13359/? I/netd: ;; res_nquery(maps.googleapis.com, 1, 1)
      2018-11-15 10:19:46.162 13249-13358/? W/System.err: com.google.maps.errors.RequestDeniedException: This IP, site or mobile application is not authorized to use this API key. Request received from IP address *********, with empty referer
      2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.DirectionsApi$Response.getError(DirectionsApi.java:90)
      2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.internal.OkHttpPendingResult.parseResponse(OkHttpPendingResult.java:289)
      2018-11-15 10:19:46.162 13249-13358/? W/System.err: at com.google.maps.internal.OkHttpPendingResult.onResponse(OkHttpPendingResult.java:207)
      2018-11-15 10:19:46.250 13249-13356/? E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
      2018-11-15 10:19:46.251 13249-13356/? E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)
      Ensure that the "Google Maps Android API v2" is enabled.
      Ensure that the following Android Key exists:
      API Key: YOUR_KEY_HERE
      Android Application (<cert_fingerprint>;<package_name>): *********;************


      I can see 2 problems here:



      This IP, site or mobile application is not authorized to use this API


      and



      Ensure that the "Google Maps Android API v2" is enabled


      I really don't understand. Actually, I can't figure it out. I enabled everything and still not working. Is there something else to do?







      java android api google-maps






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 9:36









      End.GameEnd.Game

      2,628104089




      2,628104089
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Its not working as you haven't added SHA of your app's keystore on Google Api Console. You can get your keystore's SHA by using following command in Terminal of Android Studio:-



          keytool -list -v -keystore {keystore_name} -alias {alias_name}


          Note: Both name should have full path of file and if you path contains spaces add path in quotes.



          Example:



          keytool -list -v -keystore "C:UsersMGDesktopMy Projectstest.jks" -alias test





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53316353%2fensure-that-the-google-maps-android-api-v2-is-enabled-even-if-already-enabled%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Its not working as you haven't added SHA of your app's keystore on Google Api Console. You can get your keystore's SHA by using following command in Terminal of Android Studio:-



            keytool -list -v -keystore {keystore_name} -alias {alias_name}


            Note: Both name should have full path of file and if you path contains spaces add path in quotes.



            Example:



            keytool -list -v -keystore "C:UsersMGDesktopMy Projectstest.jks" -alias test





            share|improve this answer




























              0














              Its not working as you haven't added SHA of your app's keystore on Google Api Console. You can get your keystore's SHA by using following command in Terminal of Android Studio:-



              keytool -list -v -keystore {keystore_name} -alias {alias_name}


              Note: Both name should have full path of file and if you path contains spaces add path in quotes.



              Example:



              keytool -list -v -keystore "C:UsersMGDesktopMy Projectstest.jks" -alias test





              share|improve this answer


























                0












                0








                0







                Its not working as you haven't added SHA of your app's keystore on Google Api Console. You can get your keystore's SHA by using following command in Terminal of Android Studio:-



                keytool -list -v -keystore {keystore_name} -alias {alias_name}


                Note: Both name should have full path of file and if you path contains spaces add path in quotes.



                Example:



                keytool -list -v -keystore "C:UsersMGDesktopMy Projectstest.jks" -alias test





                share|improve this answer













                Its not working as you haven't added SHA of your app's keystore on Google Api Console. You can get your keystore's SHA by using following command in Terminal of Android Studio:-



                keytool -list -v -keystore {keystore_name} -alias {alias_name}


                Note: Both name should have full path of file and if you path contains spaces add path in quotes.



                Example:



                keytool -list -v -keystore "C:UsersMGDesktopMy Projectstest.jks" -alias test






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 15 '18 at 10:14









                nitinkumarpnitinkumarp

                1,1221022




                1,1221022
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53316353%2fensure-that-the-google-maps-android-api-v2-is-enabled-even-if-already-enabled%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Xamarin.iOS Cant Deploy on Iphone

                    Glorious Revolution

                    Dulmage-Mendelsohn matrix decomposition in Python