本文介绍: 就会出现undefined methodtargets’ for nil:NilClass`的提示,提示:targets找不到了。看到这个警告一般会在Podfile的最底部添加以下代码:会报错。但是在新版本cocoapods中使用了新特性。老项目删除pods文件夹,执行。
【Cocoapods】遇到 undefined method `targets’ for nil:nilclass 的问题
报错信息: [!] an error occurred while processing the post–install hook of the podfile.
undefined method `targets’ for nil:nilclass
看到这个警告一般会在Podfile的最底部添加以下代码:会报错
但是在新版本cocoapods中使用了新特性 install! 'cocoapods', :generate_multiple_pod_projects => true, :incremental_installation => true
来加快编译的速度。
就会出现undefined methodtargets’ for nil:NilClass`的提示,提示:targets找不到了。所以要使用新的方式,如下:
老项目删除pods文件夹,执行 pod install --verbose
就好了。
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。