在专用窗格上执行lint命令时出错“验证期间遇到未知错误(无法将nil隐式转换为字符串)”。
问题描述:
我创建依赖于另一个私有荚私人荚棉短绒效果很好,当我不添加任何依赖关系,而当我添加的依赖和运行lint命令它给我的错误在专用窗格上执行lint命令时出错“验证期间遇到未知错误(无法将nil隐式转换为字符串)”。
Encountered an unknown error (no implicit conversion of nil into String) during validation.
的林特命令:
pod spec lint --private --sources=https://github.com/*****/****.git
这是我的podSpec它有什么问题,我应该怎么做才能解决这个问题?
Pod::Spec.new do |s|
s.name = "****Framework"
s.version = "1.0.0"
s.summary = "Summary ................."
s.homepage = "https://github.com/****/****Framework"
s.description = "Description ................."
s.license = "Simplified BSD license"
s.author = { "Nahla Mortada" => "[email protected]****.com" }
s.platform = :ios, "9.0"
s.ios.deployment_target = "9.0"
s.source = { :git => "https://github.com/****/****Framework.git", :tag => s.version }
s.source_files = "****Framework/*.swift"
s.pod_target_xcconfig = {
'SWIFT_VERSION' => '3.0',
}
s.requires_arc = true
s.dependency '****'
end
完全错误:
ERROR | [iOS] unknown: Encountered an unknown error (no implicit conversion of nil into String
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/specification.rb:531:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/specification.rb:531:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/specification.rb:531:in `from_file'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/specification/set.rb:45:in `specification'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/source.rb:265:in `search'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.2.0/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:347:in `create_set_from_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:317:in `find_cached_set'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:290:in `specifications_for_dependency'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:108:in `search_for'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:206:in `block in sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:200:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:200:in `sort_by'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:200:in `sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/delegates/specification_provider.rb:52:in `block in sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/delegates/specification_provider.rb:69:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/delegates/specification_provider.rb:51:in `sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:446:in `push_state_for_requirements'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:438:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:422:in `activate_spec'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:388:in `attempt_to_activate_new_spec'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:319:in `attempt_to_activate'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:137:in `process_topmost_state'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolution.rb:78:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.5.5/lib/molinillo/resolver.rb:42:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/resolver.rb:62:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:719:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:717:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:76:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:236:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:149:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:405:in `block in download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:405:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:405:in `download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:301:in `block in perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:295:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:295:in `perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/validator.rb:79:in `validate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/spec/lint.rb:64:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/spec/lint.rb:53:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/spec/lint.rb:53:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
) during validation.
答
尝试通过运行rm -rf ~/.cocoapods
,然后运行pod setup
清除当地的CocoaPods缓存。
您的podspec
似乎是有效的,如果这不能帮助您应该尝试取消注释您的s.dependency
并再次linting它,因为依赖性pod也可能是导致此崩溃的那个。
+0
是的,它是这样做的,但依赖关系窗格是有效的,我们在不同的项目中使用它。我做了你所说的,仍然是同样的错误 – nmortada
添加--verbose选项以了解更多 –
已更新该问题,但仍不明白是什么问题 – nmortada
私有的依赖关系应该在哪里?私人回购?你有没有尝试添加“:git”或类似的东西?因为如果它是私人的未知的,它仍然需要获取它。也许看看那里:https://stackoverflow.com/questions/16905112/cocoapods-dependency-in-pod-spec-not-working – Larme