2

I am trying to create a shared folder in a dropbox account, from a Java desktop application by using the dropbox-core-sdk-2.0-beta-4, with the code below, but I am getting these exceptions:

java.lang.NoSuchMethodError:     com.dropbox.core.json.JsonWriter.writeFields(Ljava/lang/Object;Lcom/fasterxml/jack son/core/JsonGenerator;)V
at com.dropbox.core.v2.DbxFiles$CreateFolderArg$1.write(DbxFiles.java:5337)
at com.dropbox.core.v2.DbxFiles$CreateFolderArg$1.write(DbxFiles.java:5332)
at com.dropbox.core.json.JsonWriter.writeToStream(JsonWriter.java:23)
at com.dropbox.core.json.JsonWriter.writeToStream(JsonWriter.java:33)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:82)
at com.dropbox.core.v2.DbxFiles.createFolder(DbxFiles.java:8459)
at com.dropbox.core.v2.DbxFiles.createFolder(DbxFiles.java:8479)  

My code is the following:

DbxRequestConfig dbxRequestConfig = new DbxRequestConfig("test/1.0",     Locale.getDefault().toString());
DbxClientV2 dbxClient = new DbxClientV2(dbxRequestConfig, my_access_token);

FolderMetadata md = dbxClient.files.createFolder("/test");

ArrayList<AddMember> list = new ArrayList();
DbxSharing.AddMember a1 = new       DbxSharing.AddMember(DbxSharing.MemberSelector.email("[email protected]"),
DbxSharing.AccessLevel.editor);

list.add(a1);
dbxClient.sharing.addFolderMember(md.parentSharedFolderId, list);

My code is heating at:

FolderMetadata md = dbxClient.files.createFolder("/test");

I have already search for any solution to create a shared folder and add a member to it, but I am not finding anything useful to my case.

Could anyone tell me what I am doing wrong?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.