result cannot be resolved or is not a field

本文介绍了解决Android开发中遇到的resultcannotberesolvedorisnotafield错误的方法,重点在于如何正确处理和移除不必要的import android.R引用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

result cannot be resolved or is not a field

 

去掉   import android.R  引用

Caused By: javax.faces.view.facelets.FaceletException: 检验数据查询错误,{endDate=2025-07-22, notLikeKey=T11, startDate=2025-07-16},EJBException: An exception occurred while creating a query in EntityManager: Exception Description: Problem compiling [select c.id,c.orgCode,t.old_tool_gather_no from mes.tool_check c,mes.tool_note_requests t where c.request_no=t.request_no]. [7, 11] The state field path 'c.id' cannot be resolved to a valid type. [13, 22] The state field path 'c.orgCode' cannot be resolved to a valid type. [24, 44] The state field path 't.old_tool_gather_no' cannot be resolved to a valid type. [50, 66] 'mes.tool_check c' cannot be the first declaration of the FROM clause. [99, 111] The state field path 'c.request_no' cannot be resolved to a valid type. [114, 126] The state field path 't.request_no' cannot be resolved to a valid type. at com.lkm.pmi.toolSystem.server.ToolCheckListBeanEjb.queryCheckByPage2(ToolCheckListBeanEjb.java:53) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method), /** * 查询,分页 */ public List<ToolCheckEntity> queryPage2(int first, int pageSize, Map<String, String> queryMap, Map<String, String> sortMap) { try { evictAllEm(); String querySql = getCheckAndOldToolGatherNo(); Query query = this.em.createQuery(querySql); query.setFirstResult(first); query.setMaxResults(pageSize); return query.getResultList(); } catch (Exception e) { throw new EJBException(e.getMessage()); } } private String getCheckAndOldToolGatherNo(){ String sql="select c.id,c.orgCode,t.old_tool_gather_no from mes.tool_check c,mes.tool_note_requests t \n" + "where c.request_no=t.request_no"; return sql; }报错如何解决
最新发布
07-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值