GoogleMaps SDK类未声明的类型或未解析的标识符 [英] GoogleMaps SDK classes undeclared type or unresolved identifier

查看:242
本文介绍了GoogleMaps SDK类未声明的类型或未解析的标识符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用cocoapods导入库。

I am using cocoapods to import libraries.

我刚刚更新了我的pod,从那以后,一些GoogleMaps SDK类不再可用了。例如,标记为使用未声明类型和使用未解析标识符的GMSAutocompletePrediction或GMSPlacesClient。我试图删除GoogleMaps pods然后重新安装它但它没有用。即使有些类仍然可用,例如GMSAddress。

I just updated my pods and since then some of the GoogleMaps SDK classes are not available anymore. For example GMSAutocompletePrediction or GMSPlacesClient labeled as "use of undeclared type" and "use of unresolved identifier". I have tried to remove the GoogleMaps pods and then to reinstall it but it didnt work. Even though, some classes are still usable, like GMSAddress for example.

我注意到GoogleMaps不是我工作区Pods项目中的目标之一,可能是与我的问题有关吗?

I noticed that GoogleMaps was not one of the target in the Pods project of my workspace, could it be related to my problem ?

推荐答案

我终于找到了解决方案。事实上,自GoogleMaps的新更新后,我还必须导入GooglePlaces才能使用GMSAutocompleterPrediction,GMSPlaces等类......

I finally found the solution. In fact since the new update of GoogleMaps I also have to import GooglePlaces to use the classes "GMSAutocompleterPrediction", "GMSPlaces"...

我不明白为什么我之前没有必要这样做。

I don't understand why I didnt have to do that before.

编辑:
因此,要解决此问题,您只需将GooglePlaces添加到您的项目中,然后将其导入到处你需要使用这些类。

Edit : So to solve this problem you only have to add "GooglePlaces" to your project, and then import it everywhere you need to use these classes.

这篇关于GoogleMaps SDK类未声明的类型或未解析的标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆