'weak'不能应用于非类型'>'('weak' cannot be applied to non

编程入门 行业动态 更新时间:2024-10-23 08:28:08
'weak'不能应用于非类型'<<错误类型>>'('weak' cannot be applied to non-class type '<< error type>>')

我们用git。 在我使用git pull之后,我运行它并得到两个这样的错误

我有导入MIBadgeButton_Swift。 我有一个带有MIBadgeButton对象的故事板。 我将连接拖到我的视图控制器上。 错误:1。使用未声明类型'MIBadgeButton'2.'weak'不能应用于非类型类型“<<错误类型>>”但是其他人可以建立项目成功。 那么为什么我收到此错误以及如何删除此错误?

We use git. After I used git pull, I run it and get two errors like this

I have import MIBadgeButton_Swift. I have a storyboard with a MIBadgeButton object. I drag a connection to my view controller. error:1.Use of undeclared type 'MIBadgeButton' 2.'weak' cannot be applied to non-class type '<< error type>>' But other guys can build project success. So why I am getting this error and how to remove this error?

最满意答案

您使用的按钮是否放在本地框架中? 如果是这样,首先尝试重建框架,如果您不确定尝试下一步。

如果你说其他人都可以运行该项目,那么你的构建文件夹似乎变得混乱了。 您可以尝试此步骤以清理它

从设备中删除应用 在项目中的Xcode中按cmd + alt + shift + K 清理项目的派生数据(转到窗口>项目>不要按删除,按路径旁边的箭头,从那里删除所有文件和文件夹)

现在,当您按下start时,将进行一个新的干净构建

更新你提到你使用pod来管理你的项目,做一个pod outdated的pod outdated - 检查是否有任何过时的pod outdated ,你对那个带按钮的那个很感兴趣,如果有的话,对它进行更新

Is the button you are using placed in a local framework? if so try to rebuild the framework first, if you are not sure try next steps.

If you say that everybody else can run the project, it seems that your build folder got mess. You can try this steps in order to clean it

Remove app from device In Xcode within your project press cmd + alt + shift + K Clean Derived data of the project (Go to window > Projects > Don't press Delete, press the arrow next to the path, remove all files and folders from there)

Now, when you will press start, a new and clean build will be made

Update you mentioned you use pods to manage your project, do a pod outdated - to check if there are any pods outdated, you are interested in the one with the button mostly, if so do an update on it

更多推荐

本文发布于:2023-08-07 17:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465098.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用于   类型   weak   applied

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!