有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

调试时,java“this”在片段中不可用

我正在调试一个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”不可用


共 (0) 个答案