PlacesApi.placeDetails(context, placeId).await() interface error

未关闭
#1,065 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@madtriceps 已经在做这个了。

开始于 2026年8月2日。

  • #1066 来自 @madtriceps —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
java
领域
api

调研方向

使用 PlacesApi.placeDetails(context, request.placeId).await() 重现示例中的请求,然后检查 PlaceDetailsRequest.java 以及堆栈跟踪中显示的响应解析过程。追踪包含 scope 的 fields 参数是在何处生成的;当报告的请求不再因不支持 scope 字段的错误而失败时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

triage me type: bug
Code example

implementation("com.google.maps:google-maps-services:2.2.0")
PlacesApi.placeDetails(context, request.placeId).await();

Stack trace

Caused by: com.google.maps.errors.InvalidRequestException: Error while parsing 'fields' parameter: Unsupported field name 'scope'.
at com.google.maps.errors.ApiException.from(ApiException.java:42)
at com.google.maps.PlaceDetailsRequest$Response.getError(PlaceDetailsRequest.java:138)
at com.google.maps.internal.OkHttpPendingResult.parseResponseInternal(OkHttpPendingResult.java:316)
at com.google.maps.internal.OkHttpPendingResult.parseResponse(OkHttpPendingResult.java:230)
at com.google.maps.internal.OkHttpPendingResult.await(OkHttpPendingResult.java:184)
at com.google.maps.PendingResultBase.await(PendingResultBase.java:61)
at app.map.gmap.GMapPlaceService.detail(GMapPlaceService.java:155)

主要语言
Java
星标
1.8k
派生
972
平均合并
5 小时 7 分钟
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

googlemaps/google-maps-services-java 的其他 Issue

查看 googlemaps/google-maps-services-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。