gpt4 book ai didi

react-native - Pod 安装失败 - Catalina 10.15.3

转载 作者:行者123 更新时间:2023-12-03 18:34:36 25 4
gpt4 key购买 nike

我正在尝试为 React Native Xcode 项目安装 pod 文件,但我不断收到错误消息。我尝试将 cocoa pod 更新到 1.9.0,但在卸载所有版本和所有相关版本之前。

JSON::ParserError - 767: unexpected token at ''
/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.0/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/specification/set.rb:56:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/cdn_source.rb:216:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.0/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/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.0/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/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.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/bin/pod:55:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'

我的 Pod 文件包括:
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'spottd' do
# Pods for spottd
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'

permissions_path = '../node_modules/react-native-permissions/ios'

pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral.podspec"
pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars.podspec"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID.podspec"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary.podspec"
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone.podspec"
pod 'Permission-Motion', :path => "#{permissions_path}/Motion.podspec"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"
pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders.podspec"
pod 'Permission-Siri', :path => "#{permissions_path}/Siri.podspec"
pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition.podspec"
pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit.podspec"

pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Messaging'
pod 'Firebase/Messaging'
pod 'Firebase/AdMob'

pod 'react-native-geolocation', :path => '../node_modules/@react-native-community/geolocation'

target 'spottdTests' do
inherit! :search_paths
# Pods for testing
end

use_native_modules!
end

target 'spottd-tvOS' do
# Pods for spottd-tvOS

target 'spottd-tvOSTests' do
inherit! :search_paths
# Pods for testing
end

end

react-native 项目刚刚从 GitHub 上拉下来。该应用程序需要所有这些 pod 才能为用户正常工作,而不会出现问题。

最佳答案

我遇到了完全相同的问题,以下程序对我有用。
只需按以下给定顺序运行以下命令:

gem list --local | grep cocoapods

sudo gem uninstall (each item from above command)

sudo rm -rf ~/.cocoapods

sudo gem install cocoapods

cd (PROJECT DIRECTORY)

pod init

(put cocoapod in podfile)

pod install

rm -rf ~/.cocoapods/repos/trunk/

pod cache clean --all

pod install

关于react-native - Pod 安装失败 - Catalina 10.15.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60533677/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com