![](/img/trans.png)
[英]How to solve this error like Invalid `Podfile` file: [!] Unsupported options `{:exclusive=>true}` for target
[英]How can I solve this “ Invalid `Podfile` ” error?
我是 ios 开发的新手,我从另一位开发人员那里获得了 ios 项目的 zip 文件。 当我运行 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'
#
# -----------------------------------------
目录是这样的
~/桌面/ios
ls
GoogleService-Info.plist ISApp.xcodeproj
Podfile.lock
ISApp ISApp.xcworkspace
Pods
ISApp-tvOS ISAppTests
instrumentscli0.trace
ISApp-tvOSTests Podfile
我已经查看了下面的线程,但它根本没有帮助。 任何输入表示赞赏。
react-native ios Podfile 问题与“use_native_modules!”
您需要提供 podfile 的内容。 您的 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格式化没有搞砸)到新的 podfile,然后再次安装 pod( pod install
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.