写完Podfile,运行pod install。terminal报出这样的错误:

打开xcworkspace工程文件,在xcode编译是就会报:/Podfile.lock: No such file or directory
这个错。
注意上面这段话中的../Configuration/YYY.xcconfig,这说明你的xcode原工程中已经有了某一个叫YYY的xcconfig文件,cocoapods就不会去覆盖这个文件。直接导致的后果就是项目配置文件没有设置。

注意红框这一块,如果你报/Podfile.lock: No such file or directory这个错,很可能看不到target中build settings中的这些配置。
解决方法就是在target的info标签页中,把configuations中的配置项设置成None。Debug和Release都进行设置。

接下来,删除工程文件夹中所有的pod相关文件,除了Podfile。其中包括Pod文件夹,Podfile.lock,xcworkspace文件等等。接着重新运行Pod install命令。重新打开xcworkspace工程文件。
问题解决!!
网友评论