我正在调试一个Android应用程序,最初可以调试变量值,但是当我从api获得响应时,它说“这”是无法唤醒的。请帮忙。
我尝试了以下链接,但没有运气
“'this' is not available” in debug windows of Android Studio
这是代码段
Error error = errors.getError().get(0);
if (request.getItemSearchRequest().getItemPage().equals("1")) {
// display the error on screen if it is first page
if (error.getCode().equals("AWS.ECommerceService.NoExactMatches")) {
// no results found
// check if the keyword is ASIN
if (ProductCodeValidator.INSTANCE.isValidASIN(keyword)) {
// get the product info using Item Look up for that ASIN
Map<String, String> params = new ArrayMap<>();
params.put("Operation", "ItemLookup");
params.put("ItemId", keyword);
params.put("IdType", ProductCodeType.ASIN.getRealName());
String requestUrl = getSignedUrl(params);
getViewModel().lookUpASIN(requestUrl);
return;
}
}
getViewModel().showEmptyView(getString(R.string.notFound)); // error.getMessage()
} else {
// display the error as toast
showToast(error.getMessage());
}
我在调试“关键字”变量时无法使用“ this”