GooglePlaces API“Response That We Couldn't Understand”错误

7
使用带搜索栏的标准自动填充代码:
placesClient.autocompleteQuery(searchBar.textField.text!, bounds: nil, filter: filter, callback: {(results, error) -> Void in
        if let error = error {
            print("Autocomplete error \(error)")
            return
        }
        if let results = results {
            for result in results {
                print("Result \(result.attributedFullText) with placeID \(result.placeID)")

                self.predictions.append(result)
            }
        }

        self.placesTableView.reloadData()
    })

几个月来一直在工作,今晚开始报告这个错误:
自动完成错误 Error Domain=com.google.places.ErrorDomain Code=-2 "Places API 服务器返回了一个我们无法理解的响应。如果您认为此错误代表了一个漏洞,请使用我们社区和支持页面上的说明提交报告(https://developers.google.com/places/support)。"
UserInfo={NSLocalizedFailureReason=Places API 服务器返回了一个我们无法理解的响应。如果您认为此错误代表了一个漏洞,请使用我们社区和支持页面上的说明提交报告(https://developers.google.com/places/support)。, NSUnderlyingError=0x600000444380 {Error Domain=com.google.places.server.ErrorDomain Code=-1 "(null)" UserInfo={NSUnderlyingError=0x600000444350 {Error Domain=com.google.HTTPStatus Code=404 "Not Found" UserInfo={NSLocalizedDescription=Not Found}}}}}
还有其他人遇到这个问题吗?

1
如果你调用地点API,那么它是有效的。我已经在浏览器中调用了地点API,但是在使用gmsplacesclient时没有起作用。 - Jiten Parmar
我也在iOS上遇到了Google Places API相同的问题。在Android上,它运作良好。 - Thuy
1
遇到了同样的问题。肯定是一个服务问题。 - adrian.coroian
2个回答

1

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接