Поместите сборщик рядом с запуском в Android - PullRequest
0 голосов
/ 20 июня 2019

Я интегрирую сборщик Google Place в Android, но он закрывается после запуска.

Код :

PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
        try {
            Intent intent = builder.build(this);
            startActivityForResult(intent, PLACE_PICKER_REQUEST);
        } catch (GooglePlayServicesRepairableException e) {
            e.printStackTrace();
            AlertDialogHelper.showAlertDialog(this,e.getLocalizedMessage());
        } catch (GooglePlayServicesNotAvailableException e) {
            e.printStackTrace();
            AlertDialogHelper.showAlertDialog(this,e.getLocalizedMessage());
        }

Error

BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/placesandroid/v1/search?key=****************PpdwBIWzGwY
2019-06-20 22:51:08.222 2115-13410/? E/Places: Places API for Android does not seem to be enabled for your app. See https://developers.google.com/places/android/signup for more details.
2019-06-20 22:51:08.223 2115-13410/? E/AsyncOperation: serviceID=65, operation=SearchPlaces
    OperationException[Status{statusCode=PLACES_API_ACCESS_NOT_CONFIGURED, resolution=null}]
        at bhjl.a(:com.google.android.gms@17455021@17.4.55 (040408-248795830):1)
        at bhjn.a(:com.google.android.gms@17455021@17.4.55 (040408-248795830):23)
        at aaha.run(:com.google.android.gms@17455021@17.4.55 (040408-248795830):19)
        at bjyv.run(:com.google.android.gms@17455021@17.4.55 (040408-248795830):2)
        at smu.b(:com.google.android.gms@17455021@17.4.55 (040408-248795830):37)
        at smu.run(:com.google.android.gms@17455021@17.4.55 (040408-248795830):18)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at ssz.run(:com.google.android.gms@17455021@17.4.55 (040408-248795830))
        at java.lang.Thread.run(Thread.java:760)

Консоль API Google

enter image description here

enter image description here

enter image description here* * 1030

enter image description here

1 Ответ

1 голос
/ 20 июня 2019

См. это .

Выбор места будет скоро отключен, и он уже устарел.

ВАЖНО: Сборщик места устарел с 29 января 2019 года. Эта функция будет отключена29 июля 2019 года, и больше не будет доступен после этой даты.Чтобы продолжить использование средства выбора мест в течение периода устаревания, НЕ отключайте службу Places SDK для Android в своем проекте Google Cloud Platform, так как это также отключит средство выбора мест.

...