Java 查看方法定义 Cannot infer type arguments for XXX<>报错如何解决

本文介绍了在遇到类同名前需添加包名以及参数类型错误时,如何利用Eclipse的Open Declaration和IDEA的Go To -> Declaration and Usages功能查看并修复问题。通过这些工具,开发者可以快速定位到方法定义,从而进行有效的代码调试和修正。

1、类同名 前面加上包名
2、参数类型错误
选中报错部分 右键
eclipse :Opean Declaration
IDEA : Go To -> Declaration and Usages

查看方法定义

Appid: __UNI__5D2350E HBuilderX版本号:4.87 云打包服务器SDK版本: 4.87 e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:23:28 Cannot infer type for this parameter. Specify it explicitly. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:24:17 Interface 'interface Project : Any' does not have constructors. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:25:17 Interface 'interface Project : Any' does not have constructors. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:26:17 Interface 'interface Project : Any' does not have constructors. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:57:37 Cannot infer type for this parameter. Specify it explicitly. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:57:37 Not enough information to infer type argument for 'T'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:57:62 Syntax error: Type expected. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:57:62 Syntax error: Incomplete code. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:63:13 Missing return statement. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:63:14 Unresolved reference. None of the following candidates is applicable because of a receiver type mismatch: fun Number.compareTo(other: Number): Int e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:66:21 'return' is prohibited here. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:66:28 Cannot infer type for this parameter. Specify it explicitly. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:66:28 Not enough information to infer type argument for 'E'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:69:17 'return' is prohibited here. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:78:17 Cannot infer type for this parameter. Specify it explicitly. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:78:20 No 'get' operator method providing array access. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:87:29 Cannot create an instance of an abstract class. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:87:36 Too many arguments for 'constructor(): Number'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:87:38 Unresolved reference 'detail'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:88:33 Unresolved reference 'isFinal'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:92:29 Cannot create an instance of an abstract class. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:92:36 Too many arguments for 'constructor(): Number'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:92:38 Unresolved reference 'detail'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:93:33 Unresolved reference 'fundingSource'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:102:21 Condition type mismatch: inferred type is 'String?' but 'Boolean' was expected. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:102:26 Unresolved reference 'projectName'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:103:40 Unresolved reference 'projectName'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:109:21 Condition type mismatch: inferred type is 'String?' but 'Boolean' was expected. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:109:26 Unresolved reference 'companyName'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:110:40 Unresolved reference 'companyName'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:116:26 Unresolved reference 'isFinal'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:120:33 Unresolved reference 'isFinal'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:126:26 Unresolved reference 'fundingSource'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:127:60 Unresolved reference 'fundingSource'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:128:25 Condition type mismatch: inferred type is 'String' but 'Boolean' was expected. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:153:21 Unresolved reference 'not' for operator '!'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:175:82 Unresolved reference 'projectName'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:176:53 Unresolved reference 'projectName'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:185:82 Unresolved reference 'companyName'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:186:53 Unresolved reference 'companyName'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:197:116 Unresolved reference 'isFinal'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:199:122 Unresolved reference 'isFinal'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:208:124 Unresolved reference 'fundingSource'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:210:128 Unresolved reference 'fundingSource'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:242:111 Cannot infer type for this parameter. Specify it explicitly. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:242:120 Cannot infer type for this parameter. Specify it explicitly. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:242:127 Cannot infer type for this parameter. Specify it explicitly. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:242:136 Cannot infer type for this parameter. Specify it explicitly. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:243:88 Unresolved reference 'id'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:247:111 Unresolved reference 'name'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:248:98 Unresolved reference 'company'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:249:102 Unresolved reference 'isFinal'. e: file://[PackagePath]/wgtRoot/__UNI__5D2350E/.uniappx/android/src/pages/query/query.kt:255:98 Unresolved reference 'fundingSource'.
最新发布
01-05
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

隔壁de小刘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值