使用 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,然后就可以正常使用啦!谢谢

你可能感兴趣的:(使用 cocoapods集成高德地图 出现[!] Oh no, an error occurred.的解决方法)