pod install error(NoMethodError - undefined method `size’ for nil:NilClass)

  • 前言
  • 问题截图
  • 问题的相关连接:
  • 解决办法

前言

最近在运行flutter项目iOS环境时,遇到了以下3个错误,研究了好久,终于找到了解决方案,Mark一下

  1. pod install error
  2. NoMethodError - undefined method `size’ for nil:NilClass
  3. NoMethodError - undefined method `each’ for nil:NilClass

问题截图

[!] Oh no, an error occurred.Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=undefined+method+%60size%27+for+nil%3ANilClass&type=IssuesIf none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/newBe sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.mdDon't forget to anonymize any private data!Looking for related issues on cocoapods/cocoapods...- pod    install  errorhttps://github.com/CocoaPods/CocoaPods/issues/9453 [open] [1 comment]3 days ago- NoMethodError - undefined method `size' for nil:NilClasshttps://github.com/CocoaPods/CocoaPods/issues/9295 [closed] [2 comments]04 Nov 2019- NoMethodError - undefined method `each' for nil:NilClasshttps://github.com/CocoaPods/CocoaPods/issues/9239 [closed] [3 comments]6 weeks agoand 2 more at:
https://github.com/cocoapods/cocoapods/search?q=undefined%20method%20%60size%27%20for%20nil&type=Issues&utf8=✓[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

问题的相关连接:

https://github.com/CocoaPods/CocoaPods/search?q=undefined+method+%60size%27+for+nil%3ANilClass&type=Issues

解决办法

在flutter项目里打开 Terminal
依次执行:

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
flutter build iOS

解决完毕,希望对有需要的同学有所帮助~~

pod install error(NoMethodError - undefined method `size’ for nil:NilClass)相关推荐

  1. package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodErr

    Mac是10.13.1 安装CocoaPods 在这里找到答案:http://blog.csdn.net/chenyyhh92/article/details/53232816 里面说 将%RUBY_ ...

  2. NoMethodError:undefined method to_ISO8601 for nil:NilClass

    转载请注明出处:http://blog.csdn.net/gamer_gyt 博主微博:http://weibo.com/234654758 Github:https://github.com/thi ...

  3. react-native pod install: [!] Error installing boost-for-react-native

    - 具体错误: [!] Error installing boost-for-react-native [!] Failed to download 'boost-for-react-native': ...

  4. QT一些error(C1057、LNK2019、C2146、C3861)的解决

    最近在玩QT,经常会报一些第一眼看不懂在讲啥的错误.总结了一下. 报错一: C1057:宏扩展中遇到意外的文件结束 双击找到报错的那行,一般是括号不匹配. 看网上资料说,也可能是编码问题,可以改成UT ...

  5. RedHat6.5虚拟机架设Redis和Kafka伪集群(2018.8.21最新重要补充!)

    架设Redis: 虚拟机架设,桥接模式下要保证实体机能上网,这样虚拟机才会分配到一个ip(这里是192.168.43.105),方便下面的集群配置每个节点ip,伪集群都设置成一个, 但要保证这个ip网 ...

  6. ruby on rails错误undefined method `title#39; for nil:NilClass

    首先搞清楚这句话,在 Ruby 中,方法分为 public.private 和 protected 三种,仅仅有 public 方法才干作为控制器的动作. 我的出错的代码例如以下: controlle ...

  7. php undefined function 几个函数,PHP Fatal error: Call to undefined function 函数名() in 解决方法...

    PHP Fatal error: Call to undefined function 函数名() in 解决方法 发布于 2015-01-14 08:55:15 | 219 次阅读 | 评论: 1 ...

  8. Web开发——HTML基础(HTML表单/下拉列表/多行输入)

    参考: 参考:http://www.w3school.com.cn/html/html_forms.asp 目录: 1.<form> 元素 1.1 <input> 元素(输入属 ...

  9. wordpress 安装(亲身经历) 出现“Fatal error: Call to undefined function get_magic_quotes_gpc()”之后的解决方法...

    传说中wordpress是5分钟安装,可是昨天晚上安装了很长时间都没有安装好,先了卸掉了原来的appserv2.5.9,然后安装上了appserv2.6.0,(不要忘了备份原来的资料), 之后看了官网 ...

最新文章

  1. [NC21228]货币系统
  2. centos6.5环境安装zookeeper-3.4.5
  3. Apache ZooKeeper - 线上系统日志清理
  4. Android 拉起小程序页面进行传值
  5. Authid current_user的用法
  6. bitwig编曲软件linux,Bitwig 中文视频教程——注册安装和基础功能入门
  7. windows安全模式_鲁大师正式挂牌上市,使用鲁大师如何开启笔记本电脑全面节能模式...
  8. Vue (响应式原理-模拟-0)
  9. error: member “torch::jit::ProfileOptionalOp::Kind“ may not be initialized
  10. php开发_图片验证码
  11. python表单防重复提交_传统方式提交表单,防止重复提交问题?
  12. HDMI热插拔检测原理
  13. 怎么用追 MM 来理解 23 种设计模式?
  14. matlab绘制两个函数,一系列复杂表达式迭代。怎么能画出某两个变量的函数曲线...
  15. 苹果开发——设置iTunesnbsp;Connec…
  16. 信杂比公式_信噪比(信噪比计算公式)
  17. 第四章 选择结构程序设计习题总结
  18. ios 代理和委托的区别
  19. 就想了解服务器为什么1M带宽网速却达不到1M
  20. vscode调整代码大小

热门文章

  1. 尊享手机APP,款款不能少!
  2. Android activity间的数据回传
  3. java 判断文件类型是否是音频_用java流方式判断文件类型
  4. swank: (too proud or confident) 炫耀;卖弄 to behave in way that is too proud or confident
  5. Java版权世纪大战,谷歌赢了甲骨文
  6. 字符编码在项目中的应用(一)
  7. Raptor实践参考:求圆周长
  8. android开发百度地图定位到几内亚湾问题的解决
  9. 安装WIN10 linux Ubuntu(18.04)双系统
  10. 修改电脑中C盘下的文件名