使用 cocoapods集成高德地图 出现[!] Oh no, an error occurred.的解决方法

国庆回来就接到任务,所以我就按高德地图的提示集成地图,可集成的时候出现个这样的问题,其实问题不难,只是出现一大串的英文天数乱码!哈哈哈哈!(PS:也不是我英文不好,只是那么多我真得看得有点晕眩)不过最后在实践中我仍然把问题给解决了啊!

下面这是终端的过程使用命令的过程,建议大家为了方便查看这个英文建议可以把下面的英文复制到“SnippetsLab”软件的 Mac 端选择 OC 语言打开,这样的话就直观多了!如果各位看官各位大神想要这个软件,再联系我。

开始:


zouhuapingdeMacBook-Pro:xiaomifengGaodeMapTest zouhuaping$ pod install --repo-updateUpdating local specs repositories CocoaPods 1.4.0.beta.1 is available.To update use: `sudo gem install cocoapods --pre`[!] This is a test version we'd love you to try. For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.4.0.beta.1 Analyzing dependencies ――― MARKDOWN TEMPLATE ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ### Command ```/Users/zouhuaping/.rvm/rubies/ruby-2.0.0-p648/bin/pod install --repo-update``` ### Report * What did you do? * What did you expect to happen? * What happened instead?  ### Stack ```  CocoaPods : 1.1.1        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin16.1.0]    RubyGems : 2.4.8        Host : Mac OS X 10.13 (17A405)      Xcode : 9.0 (9A235)        Git : git version 2.13.5 (Apple Git-94)Ruby lib dir : /Users/zouhuaping/.rvm/rubies/ruby-2.0.0-p648/libRepositories : master - https://github.com/CocoaPods/Specs.git @ 0c7b47e9c3b362420cf79fabbb1646439efc06db``` ### Plugins ```cocoapods-deintegrate : 1.0.1cocoapods-plugins    : 1.0.0cocoapods-search      : 1.0.0cocoapods-stats      : 1.0.0cocoapods-trunk      : 1.1.1cocoapods-try        : 1.1.0``` ### Podfile ```rubyplatform :ios, '7.0' #手机的系统 target 'xiaomifengGaodeMapTest' dopod 'AMap3DMap' #3D地图SDKpod 'AMapSearch' #搜索服务SDKend``` ### Error ```LoadError - cannot load such file -- nanaimo/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/xcodeproj-1.4.1/lib/xcodeproj/plist.rb:23:in `read_from_path'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:200:in `initialize_from_file'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:102:in `open'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:855:in `block (2 levels) in inspect_targets_to_integrate'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:854:in `each'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:854:in `block in inspect_targets_to_integrate'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:64:in `section'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:849:in `inspect_targets_to_integrate'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:66:in `analyze'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:236:in `analyze'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:64:in `section'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:149:in `resolve_dependencies'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:110:in `install!'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/command/install.rb:37:in `run'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in `run'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/gems/cocoapods-1.1.1/bin/pod:55:in `'/Users/zouhuaping/.rvm/rubies/ruby-2.0.0-p648/bin/pod:23:in `load'/Users/zouhuaping/.rvm/rubies/ruby-2.0.0-p648/bin/pod:23:in `'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/bin/ruby_executable_hooks:15:in `eval'/Users/zouhuaping/.rvm/gems/ruby-2.0.0-p648@global/bin/ruby_executable_hooks:15:in `'

```

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:

https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+nanaimo&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...

- LoadError - cannot load such file -- nanaimo

https://github.com/CocoaPods/CocoaPods/issues/6214 [closed] [39 comments]

13 Jun 2017

- LoadError - cannot load such file -- nanaimo

https://github.com/CocoaPods/CocoaPods/issues/6281 [closed] [20 comments]

20 Apr 2017

- pod lib create fails: uninitialized constant Nanaimo::Reader::StringScanner (NameError)

https://github.com/CocoaPods/CocoaPods/issues/6106 [closed] [22 comments]

12 Jun 2017

and 13 more at:

https://github.com/cocoapods/cocoapods/search?q=cannot%20load%20such%20file%20--%20nanaimo&type=Issues&utf8=✓

zouhuapingdeMacBook-Pro:xiaomifengGaodeMapTest zouhuaping$ sudo gem install cocoapods --pre

Password:

Successfully installed xcodeproj-1.5.2

Fetching: molinillo-0.6.3.gem (100%)

Successfully installed molinillo-0.6.3

Fetching: netrc-0.11.0.gem (100%)

Successfully installed netrc-0.11.0

Fetching: cocoapods-trunk-1.3.0.gem (100%)

Successfully installed cocoapods-trunk-1.3.0

Fetching: cocoapods-downloader-1.1.3.gem (100%)

Successfully installed cocoapods-downloader-1.1.3

Fetching: cocoapods-core-1.4.0.beta.1.gem (100%)

Successfully installed cocoapods-core-1.4.0.beta.1

Fetching: cocoapods-1.4.0.beta.1.gem (100%)

Successfully installed cocoapods-1.4.0.beta.1

Parsing documentation for xcodeproj-1.5.2

Installing ri documentation for xcodeproj-1.5.2

Parsing documentation for molinillo-0.6.3

Installing ri documentation for molinillo-0.6.3

Parsing documentation for netrc-0.11.0

Installing ri documentation for netrc-0.11.0

Parsing documentation for cocoapods-trunk-1.3.0

Installing ri documentation for cocoapods-trunk-1.3.0

Parsing documentation for cocoapods-downloader-1.1.3

Installing ri documentation for cocoapods-downloader-1.1.3

Parsing documentation for cocoapods-core-1.4.0.beta.1

Installing ri documentation for cocoapods-core-1.4.0.beta.1

Parsing documentation for cocoapods-1.4.0.beta.1

Installing ri documentation for cocoapods-1.4.0.beta.1

7 gems installed

zouhuapingdeMacBook-Pro:xiaomifengGaodeMapTest zouhuaping$ pod install --repo-update

Updating local specs repositories

CocoaPods 1.4.0.beta.1 is available.

To update use: `sudo gem install cocoapods --pre`

[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.4.0.beta.1

Analyzing dependencies

Downloading dependencies

Installing AMap3DMap (5.4.0)

Installing AMapFoundation (1.4.2)

Installing AMapSearch (5.4.0)

Generating Pods project

Integrating client project

[!] Please close any current Xcode sessions and use `xiaomifengGaodeMapTest.xcworkspace` for this project from now on.

Sending stats

Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installed.

zouhuapingdeMacBook-Pro:xiaomifengGaodeMapTest zouhuaping$


结束。

以上就是终端里的整个操作过程,解决这个问题的关键命令就是sudo gem install cocoapods --pre,然后就可以正常使用啦!谢谢

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,117评论 4 362
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,328评论 1 293
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,839评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,007评论 0 206
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,384评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,629评论 1 219
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,880评论 2 313
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,593评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,313评论 1 243
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,575评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,066评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,392评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,052评论 3 236
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,082评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,844评论 0 195
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,662评论 2 274
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,575评论 2 270

推荐阅读更多精彩内容