pod install error(NoMethodError - undefined method `size’ for nil:NilClass)
Preface
Recently, when running the flutter project iOS environment, I encountered the following 3 errors. After studying for a long time, I finally found a solution. Mark
- pod install error
- NoMethodError - undefined method `size’ for nil:NilClass
- NoMethodError - undefined method `each’ for nil:NilClass
Question screenshot
[!] 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=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
- pod install error
https://github.com/CocoaPods/CocoaPods/issues/9453 [open] [1 comment]
3 days ago
- NoMethodError - undefined method `size' for nil:NilClass
https://github.com/CocoaPods/CocoaPods/issues/9295 [closed] [2 comments]
04 Nov 2019
- NoMethodError - undefined method `each' for nil:NilClass
https://github.com/CocoaPods/CocoaPods/issues/9239 [closed] [3 comments]
6 weeks ago
and 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`.
Related links for the problem:
Solution
Flutter open the project in Terminal
order to perform:
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
After the solution is completed, I hope to help students in need~~