Couldn't connect to Google API client

后端 未结 7 722
无人共我
无人共我 2020-12-11 16:59

I can\'t fetch last known location. I have enabled Geocoding API and Google Places API for Android in google console. I added api key to ma

7条回答
  •  没有蜡笔的小新
    2020-12-11 17:54

    I had a similar issue here. Although I was not using any Google API specifically, I was having this error too.

    My scenario was: I was making a Wearable App, and wanted to send DataItem from phone to wearable. In order to do that, I was using GoogleApiClient and Wearable.DataApi.

    After many hours struggling to solve the problem, I came to this post: https://android-developers.googleblog.com/2014/10/tips-for-error-handling-with-android.html.

    The part on the article that was important to me was:

    When requesting Wearable.API when no Android Wear companion application or device is available.

    So, I solved the problem installing the Companion App on the phone: https://play.google.com/store/apps/details?id=com.google.android.wearable.app

    After installing it, the ResultCallback started to return success.

提交回复
热议问题