Java、Dropbox Api V2 - 尝试发出长轮询请求时出错

Java, Dropbox Api V2 - Error while trying to make a longpoll request

我使用Dropbox Api V2 同步文件夹中的应用程序数据。为了跟踪我的 Dropbox 目录中的更改,我使用了长轮询。这是我的代码 mDbxFile.java:

File f = new File("my_filepath");
DbxRequestConfig requestConfig = new DbxRequestConfig("my_prog/1.0", Locale.getDefault().toString());
DbxAuthInfo authInfo = DbxAuthInfo.Reader.readFromFile(f);
DbxClientV2 dbc = new DbxClientV2(requestConfig, authInfo.accessToken);
DbxFiles.ListFolderGetLatestCursorResult cursorResult = dbc.files.listFolderGetLatestCursor("");
DbxFiles.ListFolderLongpollResult longpollResult = dbc.files.listFolderLongpoll(cursorResult.cursor);

但是当我执行它时出现以下错误:

com.dropbox.core.DbxException$BadRequest: Error in call to API function "files/list_folder/longpoll": Your request includes an Authorization header, but this function does not use it.
at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:262)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:95)
at com.dropbox.core.v2.DbxFiles.listFolderLongpoll(DbxFiles.java:7678)
at com.dropbox.core.v2.DbxFiles.listFolderLongpoll(DbxFiles.java:7705)
at com.cramming_tools.draico.dbx.mDbxFile.run(mDbxFile.java:122)
at java.lang.Thread.run(Thread.java:745)

错误是由最后一行触发的。

这是 Dropbox Java SDK 中的一个已知问题,将在以后的更新中解决。