大家好,
我是应用程序开发的新手,我正在尝试为正在构建的应用程序安装Firebase身份验证。
我已经安装了xcode 11.6,并通过命令提示符(sudo gem install cocoapods)将可可豆荚文本文件下载到了我的项目文件中。
然后我使用Firebase依赖项(库)编辑了文本文件,并使用以下命令:
荚初始化 然后: 吊舱安装
它返回了以下错误:
admins-MBP-2:清洁车轮lyndon $吊舱安装 分析依赖性
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――― ―――――――――――――――――
/usr/local/bin/pod install
您做了什么?
您期望发生什么?
发生了什么事?
CocoaPods : 1.9.3
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.6 (19G73)
Xcode : 11.6 (11E708)
Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.5.0
cocoapods-try : 1.2.0
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Clean Wheels' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Clean Wheels
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
end
JSON::ParserError - 416: unexpected token at '{
"dependencies": {
"Firebase/CoreOnly": [
],
"FirebaseD'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver/lazy_specification.rb:29:in `subspec_by_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `block in specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
―――模板结束―――――――――――――――――――――――――――――――――――――――――――――― ――――――――――――――――――――――
[!]哦,不,发生错误。
如果不存在,则使用以下显示的模板创建票证: https://github.com/CocoaPods/CocoaPods/issues/new
请务必先阅读供稿指南,以获取有关如何正确提交票证的详细信息: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
别忘了匿名化任何私人数据!
正在寻找有关cocoapods / cocoapods的问题...
Pod标头未更新 https://github.com/CocoaPods/CocoaPods/issues/2329 [关闭] [1条评论] 2014年9月8日
在没有Demo项目的情况下执行pod lib创建时崩溃 https://github.com/CocoaPods/CocoaPods/issues/2337 [关闭] [5条评论] 2014年9月8日
pod lib create:为什么我被迫使用测试框架?为什么也没有XCTest? https://github.com/CocoaPods/CocoaPods/issues/2338 [关闭] [1条评论] 2014年7月26日
[!]因为未指定平台,所以自动在目标iOS
上分配了版本13.6
的平台Clean Wheels
。请在您的Podfile中为此目标指定一个平台。参见https://guides.cocoapods.org/syntax/podfile.html#platform
。
答案 0 :(得分:3)
这看起来像是损坏的CocoaPods缓存:
pod cache clean --all
sudo rm -rf ~/.cocoapods/repos
https://github.com/CocoaPods/CocoaPods/issues/9672#issuecomment-632810885上的详细信息