Dropbox的ServerException在Android中 [英] Dropbox ServerException In Android

查看:379
本文介绍了Dropbox的ServerException在Android中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想文本文件发送到Dropbox的,但我不知道为什么会出现一些错误出来显示Dropbox的ServerException。

我的程序工作,直到完成验证但是,,
后,它进入DropboxException表示错误以及

  mDBApi.putFileOverwrite(文件路径,新的FileInputStream(文件),file.length(),NULL);

将不被执行。

下面是我的LogCat中:

 十月12日至26日:27:24.214:W / System.err的(1154):DropboxServerException(nginx的):403禁止(禁止)
 一十月12日至26日:27:24.224:W / System.err的(1154):在com.dropbox.client2.RESTUtility.parseAsJSON(RESTUtility.java:263)
 一十月12日至26日:27:24.224:W / System.err的(1154):在com.dropbox.client2.RESTUtility.execute(RESTUtility.java:411)
 一十月12日至26日:27:24.224:W / System.err的(1154):在com.dropbox.client2.DropboxAPI $ BasicUploadRequest.upload(DropboxAPI.java:1081)

`

我搜索的谷歌没有任何这一点。

这里是链接我的整个计划。

[1] [com.dropbox.client2.exception.DropboxUnlinkedException

所有Dropbox的专家,plz帮助我解决这个问题。 (,)


解决方案

  AndroidAuthSession会话=新AndroidAuthSession(appKeys,ACCESS_TYPE);

1,检查 AndroidAuthSession 连接使用 isLinked()

2.检查接入类型,在我来说,我使用 AccessType.APP_FOLDER 将失败(403禁止)
  但 AccessType.DROPBOX

I am trying to send text file to dropbox but i dont know why there is some error comes out showing Dropbox ServerException.

My program works till complete the authentication but,, after that it goes to DropboxException showing the error and

mDBApi.putFileOverwrite(filePath, new FileInputStream(file), file.length(), null);

won't get executed.

Here is my LogCat :

 12-26 10:27:24.214: W/System.err(1154): DropboxServerException (nginx): 403 Forbidden (Forbidden)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.RESTUtility.parseAsJSON(RESTUtility.java:263)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:411)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.DropboxAPI$BasicUploadRequest.upload(DropboxAPI.java:1081)

`

I searched on google there is nothing for this.

here is the link for my whole program.

[1] [com.dropbox.client2.exception.DropboxUnlinkedException

All Dropbox Experts, Plz Help me to solve this. ( ',' )

解决方案

AndroidAuthSession session = new AndroidAuthSession(appKeys,ACCESS_TYPE);

1.check AndroidAuthSession connection use isLinked()

2.check AccessType, in my case I use AccessType.APP_FOLDER will fail(403 Forbidden) but AccessType.DROPBOX is fine

这篇关于Dropbox的ServerException在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆