-2

I have problem on API Google. My error is

 OperationException[Status{statusCode=PLACES_API_ACCESS_NOT_CONFIGURED, resolution=null}]

my manifest

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

<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />

my build.gradle

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

// Google play services
api 'com.google.android.gms:play-services:12.0.1'

}

and my implementation

mGoogleApiClient = new GoogleApiClient
            .Builder(this)
            .addApi(Places.GEO_DATA_API)
            .addApi(Places.PLACE_DETECTION_API)
            .enableAutoManage(this, this)
            .build();

I have on Places API, but it's not work .. So where i have error?

Graccous
  • 1
  • 2

1 Answers1

0

It seems that you are trying to use Google places API without configuring a project and enabling this API

Ramy Ibrahim
  • 656
  • 4
  • 19
  • I do not understand – Graccous Feb 20 '19 at 21:59
  • I mean you need to enable the Google Places API for Android in developers console and check on the credentials page the api key. – Ramy Ibrahim Feb 21 '19 at 04:22
  • Yes I enable Places API and Maps SDK for Android but it still does not work. I try create second key but it also did not help. I copy map_activity.class from https://youtu.be/6Trdd9EnmqY and he works with him – Graccous Feb 21 '19 at 07:18