我正在尝试使用 Sync API 将文件上传到 Dropbox,但在上传时出现错误
W/libDropboxSync.so(status): REQUEST: api_core.cpp:264: HTTP request error 400: v1_retired [dc166c5befd76df2]
W/com.dropbox.sync.android.DbxAccount: Failed to update account info.
com.dropbox.sync.android.DbxException$Request: _jobject* dropboxsync::Java_com_dropbox_sync_android_NativeApp_nativeGetAccountInfo(JNIEnv*, jobject, jlong, jobject) - Invalid server request: HTTP request error 400: v1_retired [dc166c5befd76df2]
at com.dropbox.sync.android.DbxError.exceptionFrom(DbxError.java:296)
at com.dropbox.sync.android.NativeLib.exceptionFrom(NativeLib.java:254)
at com.dropbox.sync.android.NativeLib.throwFrom(NativeLib.java:242)
at com.dropbox.sync.android.NativeApp.nativeGetAccountInfo(Native Method)
at com.dropbox.sync.android.NativeApp.getAccountInfo(NativeApp.java:175)
at com.dropbox.sync.android.DbxAccount.fetchAccountInfo(DbxAccount.java:559)
at com.dropbox.sync.android.DbxAccount.backgroundUpdateAccountInfo(DbxAccount.java:540)
at com.dropbox.sync.android.CoreBackgroundProcessor$RunAccountInfoUpdate.attemptRun(CoreBackgroundProcessor.java:209)
at com.dropbox.sync.android.CoreBackgroundProcessor$BackgroundRunner.run(CoreBackgroundProcessor.java:239)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
在代码下方,我用于文件上传。从 2 天开始就卡在这个状态。
DbxFileSystem dbxFs = DbxFileSystem.forAccount(HomeActivity.mDbxAcctMgr.getLinkedAccount());
DbxPath path = new DbxPath(recordingData.filePath);
DbxFile mFile;
try {
mFile = dbxFs.open(path);
} catch (DbxException.NotFound e) {
mFile = dbxFs.create(path);
}
mFile.addListener(mChangeListener);