Java Google place api在获取当前位置时返回错误
我正在使用GooglePlaceAPI,在这期间,我从GooglePlacePicker获取任何位置,但同时从这里获取我的当前位置Java Google place api在获取当前位置时返回错误,java,android,google-places-api,Java,Android,Google Places Api,我正在使用GooglePlaceAPI,在这期间,我从GooglePlacePicker获取任何位置,但同时从这里获取我的当前位置 PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi.getCurrentPlace(mGoogleApiClient, null); result.setResultCallback(new ResultCallback<Pla
PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi.getCurrentPlace(mGoogleApiClient, null);
result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {
@Override
public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {
Log.e("result",""+likelyPlaces);
for (PlaceLikelihood placeLikelihood : likelyPlaces) {
Log.e("result", String.format("Place '%s' has likelihood: %g",
placeLikelihood.getPlace().getName(),
placeLikelihood.getLikelihood()));
Toast.makeText(MainActivity.this,"Place "+placeLikelihood.getPlace().getName()+" has likelihood "+placeLikelihood.getLikelihood()+"",Toast.LENGTH_LONG ).show();
}
likelyPlaces.release();
}
});
所以我被困在这里很久了,我没有找到任何与此相关的解决方案
PlaceLikelihoodBuffer{status=Status{statusCode=ERROR, resolution=null}, attributions=null}