[英]Flutter pod: An error occurred while processing the post-install hook of the Podfile
[英]Podfile error while doing “pod install”?
我使用本教程制作了自己的可可豆荚。 http://guides.cocoapods.org/making/making-a-cocoapod.html我将它推送到我自己的github存储库。 https://github.com/kidsid59/appExample当我尝试在我自己的示例项目中使用它时,在其podfile中创建一个条目
target "PodInstallDemoApp" do
pod ‘appExample’, :git => 'https://github.com/kidsid59/appExample.git'
end
然后尝试在终端中运行“pod install”。 它说 :-
[!] Invalid `Podfile` file: undefined local variable or method `‘appExample’' for # <Pod::Podfile:0x007f92e111dfc0>. Updating CocoaPods might fix the issue.
看起来它无法识别pod名称。 我已经浪费了很多时间在这个小建议会有所帮助。
您可能已经使用TextEdit.app编辑了Podfile
,它替换了'
for”智能引号“( '
和'
。
一定要使用常规引号( '
)。
注意 :您不应该使用TextEdit App来编辑pod文件,因为TextEdit喜欢用更具图形吸引力的引号替换标准引号。 这可能导致CocoaPods混淆并显示错误,因此最好只使用Xcode或其他编程文本编辑器。
使用TextEdit App会给你以下,
pod ‘AFNetworking’, ‘~> 2.5′ //notice the quotes
使用Xcode打开Podfile,您将得到如下正确的引号,
pod 'AFNetworking', '~> 2.5'
在Xcode中打开的终端命令:
$ touch Podfile //OR $ cd <parentDirectory of Podfile>
$ open -a Xcode Podfile
也许是因为你没有任何标签?
尝试这样做:
$ git add -A && git commit -m "Release 0.0.1."
$ git tag '0.0.1'
$ git push --tags
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.