简体   繁体   English

如何解决这个“Invalid `Podfile`”错误?

[英]How can I solve this “ Invalid `Podfile` ” error?

I'm new to ios development and I got a zip file from another developer for an ios project.我是 ios 开发的新手,我从另一位开发人员那里获得了 ios 项目的 zip 文件。 When I ran pod install, the terminal shows this error:当我运行 pod install 时,终端显示此错误:

[!] Invalid `Podfile` file: cannot load such file -- /Users/abc/Desktop/node_modules/@react-native-community/cli-platform-ios/native_modules.

 #  from /Users/abc/Desktop/ios/Podfile:2
 #  -----------------------------------------
 #  platform :ios, '9.0'
 >  require_relative '../node_modules/@react- 
 native-community/cli-platform- 
 ios/native_modules'
 #  
 #  ----------------------------------------- 
           

The directory is like this目录是这样的
~/Desktop/ios ~/桌面/ios
ls ls

GoogleService-Info.plist ISApp.xcodeproj          
Podfile.lock
ISApp                    ISApp.xcworkspace        
Pods
ISApp-tvOS               ISAppTests               
instrumentscli0.trace
ISApp-tvOSTests          Podfile

I have looked at the thread below but it doesn't help at all.我已经查看了下面的线程,但它根本没有帮助。 Any input is appreciated.任何输入表示赞赏。
react-native ios Podfile issue with "use_native_modules!" react-native ios Podfile 问题与“use_native_modules!”

You need to provide the contents of your podfile.您需要提供 podfile 的内容。 Your podfile is probably not formatted correctly.您的 podfile 可能格式不正确。 If it is, one workaround could be to move your podfile to a different location, uninstall and reinstall cocoapods ( sudo gem uninstall cocoapods and sudo gem install cocoapods ), initialize pod ( pod init ), copy the content of your podfile (making sure the formatting is not messed up) to the new podfile and then install pod again ( pod install ). If it is, one workaround could be to move your podfile to a different location, uninstall and reinstall cocoapods ( sudo gem uninstall cocoapods and sudo gem install cocoapods ), initialize pod ( pod init ), copy the content of your podfile (making sure the格式化没有搞砸)到新的 podfile,然后再次安装 pod( pod install )。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决此错误,例如无效的“ Podfile”文件:[!]目标不支持的选项{{:exclusive => true}` - How to solve this error like Invalid `Podfile` file: [!] Unsupported options `{:exclusive=>true}` for target 安装Firebase Pod错误无效Podfile - Installing Firebase pod error Invalid Podfile 无效的“Podfile”文件:套接字错误不支持操作 - Invalid `Podfile` file: Operation not supported on socket error 如何从我的 podfile 中找到 GitHub 项目? - How can I find a GitHub project from my podfile? 如何解决此委托错误? - How can I solve this delegate error? 如何解决此错误:“预期标识符” - How can I solve this error: “Expected identifier” “Podfile”文件语法错误无效,意外$ undefined,期待'}' - Invalid 'Podfile' file syntax error, unexpected $undefined, expecting '}' 当安装pod时,ERROR“无效的`Podfile`文件:未定义的方法`plateform' - when install pod ,ERROR "Invalid `Podfile` file: undefined method `plateform' Expo 弹出导致无效的“Podfile”文件:语法错误,意外的“.” - Expo eject causes Invalid `Podfile` file: syntax error, unexpected '.' flutter 错误无效的 `Podfile` 文件:没有将 nil 隐式转换为字符串。 我通过讨论进行了搜索,但我似乎无法解决问题 - flutter error Invalid `Podfile` file: no implicit conversion of nil into String. ive searched through discussions but I cant seem to fix the issue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM