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 摘要。