前言
拉下来一个新项目后,执行完pub get后,进入ios目录执行pod install 报错:[!] Oh no, an error occurred.
具体错误如下
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=767%3A+unexpected+token+at+%27%7B%0A++%22name%22%3A+%22GoogleDataTransport%22%2C%0A++%22version%22%3A+%229.1.4%22%2C%0A++%22summary%22%3A+%22Google+iOS+SDK+data+transport.%22%2C%0A++%22description%22%3A+%22Shared+library+for+iOS+SDK+data+transport+needs.%22%2C%0A++%22homepage%22%3A+%22https%3A%2F%2Fdevelopers.google.com%2F%22%2C%0A++%22license%22%3A+%7B%0A++++%22type%22%3A+%22Apache%22%2C%0A++++%22file%22%3A+%22LICENSE%22%0A++%7D%2C%0A++%22authors%22%3A+%22Google%2C+Inc.%22%2C%0A++%22source%22%3A+%7B%0A++++%22git%22%3A+%22https%3A%2F%2Fgithub.com%2Fgoogle%2FGoogleDataTransport.git%22%2C%0A++++%22tag%22%3A+%22CocoaPods-9.1.4%22%0A++%7D%2C%0A++%22platforms%22%3A+%7B%0A++++%22ios%22%3A+%229.0%22%2C%0A++++%22osx%22%3A+%2210.12%22%2C%0A++++%22tvos%22%3A+%2210.0%22%2C%0A++++%22watchos%22%3A+%226.0%22%0A++%7D%2C%0A++%22cocoapods_version%22%3A+%22%3E%3D+1.4.0%22%2C%0A++%22prefix_header_file%22%3A+false%2C%0A++%22source_files%22%3A+%5B%0A++++%22GoogleDataTransport%2FGDTCORLibrary%2F%2A%2A%2F%2A%22%2C%0A++++%22GoogleDataTransport%2FGDTCCTLibrary%2F%2A%2A%2F%2A%22%0A++%5D%27&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: undefined method `map' for nil:NilClass
解决办法:
1、升级cocoapods
sudo gem install cocoapods
2、清除cocoapods缓存
sudo rm -rf ~/.cocoapods/repos
3、进入ios,执行pod install
如果还不行的朋友可以看看这位朋友的,找到适合自己的最好
https://blog.csdn.net/weixin_43968734/article/details/108672091