Android问题Non-static method 'find(int)' cannot be referenced from a static context

非静态函数不可以引用静态变量

原函数是

OutaccountTable outaccountTable = OutaccountOperate.find(Integer.parseInt(strid));

这里OutaccountOperate是我定义的另外一个java类,所以不可以直接使用前面的strid的值,要想使用的话要先实例化OutaccountOperate

OutaccountOperate outaccountOperate = new OutaccountOperate(InfoManage.this);

即可解决问题

猜你喜欢

转载自blog.csdn.net/qq_38115310/article/details/85043544