Dan*_*año 5 android google-places-api
我正在尝试使用Google Places API获取某个地方的纬度和经度.
我正在关注此示例:Google Directions Android
我这样配置客户端:
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Places.GEO_DATA_API)
.addApi(Places.PLACE_DETECTION_API)
.addApi(LocationServices.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
Run Code Online (Sandbox Code Playgroud)
但接下来:
PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi
.getPlaceById(mGoogleApiClient, placeId);
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
java.lang.IllegalArgumentException: GoogleApiClient is not configured to use the API required for this call.
Run Code Online (Sandbox Code Playgroud)
我该如何解决?
我在Google API控制台上激活了API,我认为我正在配置它,就像示例一样.
| 归档时间: |
|
| 查看次数: |
4251 次 |
| 最近记录: |