我在使用cocoa pods 的时候,出现下面的错误
[!] Invalid Podfile
file: undefined local variable or method `afnetworking' for #<Pod::Podfile:0x007fa6c11591f8>. Updating CocoaPods might fix the issue.
关键是我不管导入什么第三方库都会出现这个,一直都导不进去
profile里面我只是写了
pod ‘sdwebimage’
也没有用到afnetworking,ruby环境重新装,cocoa pods 更新什么的都试过了,连mac的系统都更新了,还是不行,,就是不行!!!
求个大神帮我看看怎么回事
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
问题不是很清楚,你可以试试对照检查一下你的Podfile文件,正确的方式是这样的:
很多人的上引号写成的这样
编辑文件的时候最好使用vim,你试试看。一定按照官方格式来例如:
很多人会在:后面多加一个空格,这也是会报错的。
不行啊,不管我输入什么都是报错
[!] Invalid Podfile file: undefined local variable or method `afnetworking' for #<Pod::Podfile:0x007fa6c11591f8>. Updating CocoaPods might fix the issue.
关键是,不管我有没有导入什么框架都是报错没有afnetworking ,我导入其他的框架,比如sdwebimage,都是报错说没有找到afnetworking。
没有用到afnetworking框架,怎么老是报错没找到afnetworking,