我正在尝试使用 google fused location api 创建一个跟踪手机的服务,但 GoogleApiClient 无法连接到 LocationService.API 这是我在控制台中搜索 google api 客户端时收到的消息
Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
我用来连接的 GoogleApiClient 代码是这样的
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(LocationServices.API)
.build();
就像互联网上的每个教程都告诉我使用。
有谁知道为什么这对我不起作用?我可以从 android api 获取 gps 位置。