gpt4 book ai didi

ios - 运行 pod install : Invalid attribute name 时出错

转载 作者:行者123 更新时间:2023-11-29 13:54:15 24 4
gpt4 key购买 nike

我正在使用 React Native (0.60.4) 和 cocoapods (1.7.5)。当我 cd 进入我的 ios 文件夹并运行 pod install 时,出现以下错误:

[!] Invalid `Podfile` file: [!] /Users/stephensmac_air/Documents/WeeklyTasks/node_modules/.bin/react-native config

Error: Invalid attribute name
Line: 36
Column: 18
Char: .
at error (/Users/stephensmac_air/Documents/WeeklyTasks/node_modules/xmldoc/node_modules/sax/lib/sax.js:666:10)
at strictFail (/Users/stephensmac_air/Documents/WeeklyTasks/node_modules/xmldoc/node_modules/sax/lib/sax.js:692:7)
at SAXParser.write (/Users/stephensmac_air/Documents/WeeklyTasks/node_modules/xmldoc/node_modules/sax/lib/sax.js:1324:13)
at new XmlDocument (/Users/stephensmac_air/Documents/WeeklyTasks/node_modules/xmldoc/lib/xmldoc.js:199:15)
at readManifest (/Users/stephensmac_air/Documents/WeeklyTasks/node_modules/@react-native-community/cli-platform-android/build/config/readManifest.js:44:10)
at Object.projectConfig (/Users/stephensmac_air/Documents/WeeklyTasks/node_modules/@react-native-community/cli-platform-android/build/config/index.js:60:46)
at Object.get project [as project] (/Users/stephensmac_air/Documents/WeeklyTasks/node_modules/@react-native-community/cli/build/tools/config/index.js:134:65)
at /Users/stephensmac_air/Documents/WeeklyTasks/node_modules/@react-native-community/cli/build/commands/config/config.js:8:452
at Array.forEach (<anonymous>)
at _objectSpread (/Users/stephensmac_air/Documents/WeeklyTasks/node_modules/@react-native-community/cli/build/commands/config/config.js:8:392)


我的 ios 文件夹中的 Podfile 如下:

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'WeeklyTasks' do
# Pods for WeeklyTasks
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
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-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

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 '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 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios'

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

use_native_modules!
end

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

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

end

有人知道这个错误想表达什么吗?在此之前,我试图实现推送通知,我需要运行 pod install,这最终发生了。似乎 Podfile 中存在我没有注意到的语法问题?如果有人能指出这可能是什么的大致方向,我将不胜感激。谢谢!

最佳答案

卸载 cocoa pods(所有版本),然后进行全新安装。

为 react-native 和 try pod 命令创建一个测试项目,如果一切正常,然后在实际项目上尝试(先备份代码)。

关于ios - 运行 pod install : Invalid attribute name 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57748955/

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