Method cannot be marked @objc because the type of the parameter 1 cannot be represented in Objective
错误:Method cannot be marked @objc because the type of the parameter 1 cannot be represented in Objective-C
场景:swift中有需要OC调用的方法,前面加@objc ,编译器报错
翻译:方法中有一个参数没有变成OC
解决方案,确保每个参数(主要包括,类和枚举)都已经桥接 Objective-C
注意,枚举在文件内,在类外面,所以要在枚举前加@objc
@objc enum GHNFollowBtnModule: Int {case column = 0case topic = 1case author = 2case none = 999
}
Method cannot be marked @objc because the type of the parameter 1 cannot be represented in Objective相关推荐
- Type safety: The method add(Object) belongs to the raw type List. References to generic type List<E>
1 java 报错如下 Type safety: The method add(Object) belongs to the raw type List. References to generic ...
- Android NDK 【错误】The method loadLibrary(String) is undefined for the type Settings.Syste
[错误]The method loadLibrary(String) is undefined for the type Settings.System [解决方法] 不要加入包import andr ...
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法...
最近又开始看jsp,那时候用的tomcat还是5的版本,我现在自己下的用的是tomcat6,在运行随书光盘的例子的时候,报了这样的错误: type Exception report message d ...
- Mapper method 'dao.xxx' has an unsupported return type
前后端分离,前端上传数据,后台一直报这个Mapper method 'dao.xxx' has an unsupported return type错误,后来才发现是不需要返回值结果的,把返回值类型改 ...
- 解决Could not find method ndkVersion() for arguments on object of type com.android.build.问题
问题起因 今天刚升级完Android Studio 4.0,偶然用到了 NDK 相关的项目,运行后出这个错,还以为我这台电脑没有装相应的 NDK 点击Update. 然后就遇到了这个问题:Could ...
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i
The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i ...
- 解决The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory 原因:版本冲突 jav ...
- Flutter的setState的使用注意事项以及报错The method ‘setState‘ isn‘t defined for the type
错误描述 今天在写一个更换头像的功能时,为了刷新选择的头像,想使用setState去刷新头像,结果报错了. 报错如下: The method 'setState' isn't defined for ...
- Expected a default value of type Tensor on parameter residual:
Expected a default value of type Tensor on parameter "residual": 错误代码: @torch.jit.script_m ...
最新文章
- Quartz.net 开源job调度框架(一)
- 前端学习(1127):递归求数学题2
- ORA-12514: TNS:监听程序当前无法识别连接描述符中请(转)
- AI算法连载17:统计之半监督学习
- 镁光ssd管理工具 linux,镁光C400固态硬盘08TH固件及升级软件
- 学习(踩坑)记录——新建工程
- 学号 20165329 《Java程序设计》第4周学习总结
- Shell脚本-tr 将大写字母变为小写
- 关于坑爹的QQ互联成为开发者的坑
- java怎么分解质因数,java分解质因数的方法
- 谷歌浏览器Chrome显示乱码怎么办?
- 电商api全境,Python网络爬虫与数据采集
- java.lang.UnsupportedOperationException与CleanMyMac X
- hass智能 小米扫地机器人_Siri能控制小米扫地机器人吗_小米智能家居控制系统...
- 真无线降噪蓝牙耳机推荐,综合性能表现不错的降噪蓝牙耳机分享
- 阿里云国际站云服务器可以用来做什么业务?
- CocosCreator学习3:定义全局变量
- git上传代码的时候出现:Please tell me who you are.解决方法
- acrobat 打印PDF时错误:Error: typecheck; OffendingCommand: show
- 【优化】--Squid优化汇总
热门文章
- 用Navicat创建student表
- 写一个象棋游戏的 python 代码
- 动手深度学习PyTorch(九)GRU、LSTM、Bi-RNN
- 数据恢复软件-你删除过“小片”,它都能给你找出来....
- 零基础入门原画必知的技巧
- 聊聊工作中的自我管理和向上管理
- java调用短信验证失败_短信验证码被刷怎么办?java 短信验证码防刷策略
- 微信公众平台jsapi开发教程(8)显示隐藏网页右上角菜单
- Android单元测试之 Mockito
- 7.4Rabin公钥加密算法