我试图从我的 Backendless 文件中显示我的 Android Studio 项目中的“上传”文件夹。
这是代码:
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>>