public void onClick(DialogInterface dialog, int whichButton) {
String cardNumber = input.getText().toString();
LCQuery<LCObject> query = new LCQuery<>("CardInfo");
query.whereEqualTo("Card", cardNumber);
query.findInBackground(new FindCallback<LCObject>() {
@Override
public void done(List<LCObject> list, LCException e) {
if (e == null) {
if (list.size() > 0) {
LCObject cardInfo = list.get(0);
int resetTimes = cardInfo.getInt("ResetTimes");
if (resetTimes < 3) {
if (resetTimes == 0) {
resetTimes = 1;
} else {
resetTimes += 1;
}
cardInfo.put("ResetTimes", resetTimes);
cardInfo.put("Mac", "");
cardInfo.saveInBackground();
} else {
new AlertDialog.Builder(context)
.setTitle("Error")
.setMessage("Reset times reached limit.")
.setPositiveButton("OK", null)
.show();
}
}
}
}
});
}
出现'findInBackground(cn.leancloud.LCUser)' in 'cn.leancloud.LCQuery' cannot be applied to '(anonymous cn.leancloud.callback.FindCallback
这段代码原来是在com.avos.avoscloud上的,改为cn.leancloud报错了,请问一下怎么修改呢