Google Places: Error: statuscode = places_api_key_invalid resolution = null

1

I have a project on Android that works with Google Places. In the app I have a button that should take me to the Google Places page, but it closes alone and gives me this error:

  

E / Places: Invalid API key. Check that is in the element of AndroidManifest.xml. See    link for more   details E / AsyncOperation: serviceID = 65, operation = PlacePickerQuota   OperationException [Status {statusCode = PLACES_API_KEY_INVALID, resolution = null}]

Thank you.

    
asked by PacoPepe 28.02.2018 в 16:55
source

1 answer

-1

The error does not indicate that you have not defined the API KEY , it indicates that you have defined it in an incorrect position within your AndroidManifest.xml.

The same error message indicates:

  

Review that

<meta-data android:name="com.google.android.geo.API_KEY" android:value="your API
key"/> 
     

is in the file element    AndroidManifest.xml Watch    link for more   details.

Ensure that you define the value correctly within <application> and that you have defined an API Key.

...
...
 <meta-data
     android:name="com.google.android.geo.API_KEY"
    android:value="xxxxxx"/>

</application>
    
answered by 26.03.2018 в 18:12