我正在使用番石榴。 我得到一个“方法toStringHelper()未定义的类型对象错误”在日食。 我在没有错误的时候突然出现这些错误。toStringHelper()未定义类型对象
@Override
public String toString()
{
return Objects
.toStringHelper(this)
.add("id", this.id)
.add("custid", this.custid)
.toString();
}
你可以显示你的eclipse标记为错误的代码吗? –
您确定已导入并使用'com.google.common.base.Objects',但不是**'java.util.Objects'? – Xaerxess
是的,我已经导入“import com.google.common.base.Objects;” –