我试图做一个服务,跟踪与谷歌融合的位置API,但GoogleApiClient无法连接到LocationService.API手机 这是我得到的消息,当我在控制台谷歌API客户端 Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
谷歌API客户端无法连接LocationService.API不可用
的GoogleApiClient代码我用来连接搜索是这个
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(LocationServices.API)
.build();
就像在互联网上的每一个教程告诉我使用。
有谁知道为什么这对我不起作用? 我可以从android api获取gps位置。
您是否提出了一个连接请求?还是多个?您可能拥有过时的Google Play服务版本。另外,请阅读[this](http://stackoverflow.com/questions/30314765/api-unavailable-google-api-client)线程 – andrewdleach
无,也许这就是为什么?我只是将它添加到onCreate,看看是否有用。感谢您注意 – Tilion
是的,这就是为什么!谢谢<3我一直试图找出这个问题超过4小时... – Tilion