无法解析方法

Cannot resolve method

我正在尝试从我的 Backendless 文件中显示我的 Android Studio 项目中的 "Uploads" 文件夹。

这是代码:

Backendless.Files.listing("/Uploads", "*.docs", true, new AsyncCallback<BackendlessCollection<FileInfo>>() {
            @Override
            public void handleResponse(BackendlessCollection<FileInfo> response) {
                Iterator<FileInfo> filesIterator = response.getCurrentPage().iterator();
                while (filesIterator.hasNext()) {
                    FileInfo file = filesIterator.next();
                    String URL = file.getURL();
                    String publicURL = file.getPublicUrl();
                    Date createdOn = new Date(file.getCreatedOn());
                    String name = file.getName();
                }
            }

当我 运行 代码时,我得到这些错误:

Error:(34, 38) error: cannot find symbol method getURL()
Error:(35, 44) error: cannot find symbol method getPublicUrl()
Error:(36, 51) error: cannot find symbol method getCreatedOn()
Error:(37, 39) error: cannot find symbol method getName()
Error:(28, 63) error: incompatible types: <anonymous AsyncCallback<BackendlessCollection<com.example.francis.classdroid.FileInfo>>> cannot be converted to AsyncCallback<BackendlessCollection<com.backendless.files.FileInfo>>

这里的问题是 FileInfo class 的导入不正确。确保您已导入 com.backendless.files.FileInfo.

如果您不知道Java中的import是什么,您可以阅读更多here。 Java 中的导入放在文件的顶部。