[英]Failed to render instance of Swifty Button: dlopen(SwiftyButton.framework, 1): Library not loaded
I just added a pod called " SwiftyButton " into my Podfile and pod install
.我刚刚在我的 Podfile 和
pod install
添加了一个名为“ SwiftyButton ”的pod install
。 Then I added both "PureLayout" and "SwiftyButton" into the "Linked Framework and Libraries" thingy.然后我将“PureLayout”和“SwiftyButton”都添加到“Linked Framework and Libraries”中。
In the storyboard, I changed a UIButton
's class to "SwiftyButton" and this error pops up:在情节提要中,我将
UIButton
的类更改为“SwiftyButton”并弹出此错误:
Failed to render instance of Swifty Button: dlopen(SwiftyButton.framework, 1): Library not loaded: @rpath/PureLayout.frameowrk/PureLayout Referenced from: SwiftyButton.framework Reasom: image not found.
无法呈现 Swifty 按钮的实例:dlopen(SwiftyButton.framework, 1):库未加载:@rpath/PureLayout.frameowrk/PureLayout 引用自:SwiftyButton.framework 原因:找不到图像。
I have searched a lot of stack overflow posts and I tried a lot of the solutions, including我搜索了很多堆栈溢出的帖子,并尝试了很多解决方案,包括
pod install
But they all didn't work.但他们都没有工作。 The error is still there!
错误依旧!
I have also seen this question but I have no idea what the answer is talking about.我也看过这个问题,但我不知道答案在说什么。 It seems not related to Cocoapods.
它似乎与 Cocoapods 无关。
I solved the problem by uninstalling the prerelease version of cocoapods.我通过卸载 cocoapods 的预发布版本解决了这个问题。
First, I ran this command:首先,我运行了这个命令:
sudo gem uninstall cocoapods
Then it prompted me to choose a version of the gem to uninstall, so I chose 2, which is the prerelease version.然后它提示我选择要卸载的gem的版本,所以我选择了2,也就是预发布版本。
After that I checked the version of cocoapods to see whether it is the newest stable version:之后我查看了cocoapods的版本,看是不是最新的稳定版本:
pod --version
and it is!确实如此! (0.39.0)
(0.39.0)
And then I navigated back to the project directory and did:然后我导航回项目目录并执行以下操作:
pod update
Finally, I opened Xcode and it seems to be working!最后,我打开了 Xcode,它似乎可以工作了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.