i am debugging an Android app,initially debugging variable value is accessible, but when i get response from an api it says 'this' is not awailable. please help.
i tried below link but no luck
“'this' is not available” in debug windows of Android Studio
here is the code snippet
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());
}
i am getting 'this' is not available while debugging "keyword" variable