我已使用 Google Developers Console 将 Google Maps SDK 与 iOS 集成.
但是当我现在运行该应用程序时,它会出现以下错误。
ClientParametersRequest 失败,剩余 3 次尝试(0 对 5)。
Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed.(com.google.HTTPStatus error 400.)" UserInfo=0xb83c2a0 {data=<CFData 0xc13d600 [0xe7a4d8]>{length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}
然后它说
Google Maps `SDK` for `iOS` cannot connect or validate APIKey:
Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed.
(com.google.HTTPStatus error 400.)" UserInfo=0x94bf990 {data=<CFData 0x907df90 [0xe7a4d8]>
{length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}
我已请求 key ,并且我正在使用相同的 40 个字符 key 。我也试过重新生成 key 然后使用它。 我在网上搜索过,有人说应该在“服务”中启用“google SDK for iOS”。 这在我的案例中也已启用。
但没有任何效果。有人遇到过同样的问题吗?
最佳答案
我的 bundle 不正确。 我在 Google Maps Console 更改了包,然后生成了一个新 key 。
关于带有谷歌地图的 iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17655476/