简体   繁体   English

如何解决此错误,例如无效的“ Podfile”文件:[!]目标不支持的选项{{:exclusive => true}`

[英]How to solve this error like Invalid `Podfile` file: [!] Unsupported options `{:exclusive=>true}` for target

I clone the project fro from repository and this project podfile containing the version 0.39.0 .When i tried pod install command then i always get the error like Podfile file: [!] Unsupported options {:exclusive=>true} for target' . 我从仓库克隆项目和来回含有版本这个项目podfile 0.39.0 。当我试图pod install命令的话,我总是得到这样的错误Podfile文件:不支持的选项[!] {:exclusive=>true} for target' Podfile looks like the following Podfile如下所示

inhibit_all_warnings!

def shared_pods

    pod 'AFNetworking', '~> 2.0'
    pod 'Crashlytics'

end

target ‘product_DEV' do
    shared_pods
end

target ‘productTests', :exclusive => true do

    shared_pods

end

How to solve this issue? 如何解决这个问题? Please help me. 请帮我。

  • :exclusive => true do has been deprecated check out this migration guide. :exclusive => true do已被弃用,请参阅迁移指南。

    • try re-initing the pod file,so that you can have latest pod file. 请尝试重新初始化Pod文件,以便您可以拥有最新的Pod文件。
    • Or try changing the pod file content to something like this, 或者尝试将pod文件的内容更改为类似的内容,

       # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'product_DEV' do use_frameworks! pod 'AFNetworking', '~> 2.0' pod 'Crashlytics' target 'productTests' do inherit! :search_paths end end 
    • This is a bind shot, give it a try it may help,Check other reference ref1 , ref2 这是一个装订镜头,请尝试一下可能会有用,请检查其他参考ref1ref2

    • Check ref2 abstract_target may help. 检查ref2 abstract_target可能有帮助。

      abstract_target 'DummyTarget' do pod "..." target 'App1' do end target 'App2' do end end abstract_target'DummyTarget'执行pod“ ...”目标'App1'执行结束目标'App2'执行结束

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

相关问题 如何解决这个“Invalid `Podfile`”错误? - How can I solve this “ Invalid `Podfile` ” error? 不支持指定多个 post_install 挂钩的无效 Podfile 文件 - Invalid Podfile file specifying multiple post_install hooks is unsupported 尝试运行Pod安装时出现错误“无效的Podfile文件:未知的regexp选项-jackha。” - Error “Invalid `Podfile` file: unknown regexp options - jackha.” when trying to run pod install 无效的“Podfile”文件:套接字错误不支持操作 - Invalid `Podfile` file: Operation not supported on socket error 无效的“ Podfile”文件 - Invalid 'Podfile' file “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 '.' 无效的`Podfile` 文件:未初始化的常量 - Invalid `Podfile` file: uninitialized constant 无效的“Podfile”文件:未初始化的常量 Pod::Podfile::FlipperConfiguration - Invalid `Podfile` file: uninitialized constant Pod::Podfile::FlipperConfiguration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM