Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
gmartins
9 years agoExplorer | Level 3
Android API v2 - Can't build the sdk
Hi there, I'm currently trying to upgrade the sdk to v2, however, I'm struggling with simply building the repository in order to check the examples. I'm running ./gradlew install in the root ...
Qbert
9 years agoExplorer | Level 3
Hi guys,
I have the same issue.
The python installer won´t work for me either. I am trying the commands on the git bash, closest I could see to a Linux shell. But to no avail.
I do neither have a gradle nor maven build and hence I do not know what libs (jars) to add to the Java (Android?) build.
Is it lib/jackson-core-2.7.4.jar and dropbox-core-sdk-3.0.5.jar?
The json_simple-1.1.jar is not needed any longer?
Greg-DB
Dropbox Community Moderator
9 years agoQbert If you want to use the jars directly, you can find them in the tar/zip downloads for each release:
https://github.com/dropbox/dropbox-sdk-java/releases
That includes the required dependencies, i.e., just the 'dropbox' and 'jackson' jars, which is all you need typically. (It doesn't include optional dependencies for non-default functionality, such as okhttp.)
- Qbert9 years agoExplorer | Level 3Hi Greg,
Thanks for the reply. I will give it a try. Unfortunately I am still stuck with this old Eclipse project. Perhaps it's time to move to AndroidStudio and Gradle.- Qbert9 years agoExplorer | Level 3
Hi Greg,
thanks a lot for your support. I managed to get the libraries included in Eclipse as external libs.
If somoeone else reads this it might be helpful to note that I got ClassNotFound runtime exceptions that could be removed by moving the newly added libs to the top of the Java Build Path (order and export) followed by a project clean. Not sure what really helped at the end.
I reach the point were I can authenticate and get my DropBox Client.
And with this back to the initial problem:
Is there a way to load a DropBox File into a local String. That is the use case I achieved with getFileStream. I am reading the input file stream in a String.
I cannot find a corresponding method. The example performs a download, which is unfortunately no option for me.
I am also struggeling to find a mapping between my DropBox filename (string) to the FileMetadata used in the Android example.
You mind pointing me in the right direction here.
P.S.: As you mentioned I had to kick out the Http3Requestor. This Requesor would be needed for what?
DbxRequestConfig requestConfig = DbxRequestConfig.newBuilder("qkeeper-v2") //.withHttpRequestor(new OkHttp3Requestor(OkHttp3Requestor.defaultOkHttpClient())) .build();- Greg-DB9 years ago
Dropbox Community Moderator
Qbert There's an example of downloading a file here. Or, you can call download to get a DbxDownloader and call DbxDownloader.getInputStream on it to get an input stream similar to how the v1 getFileStream method worked.
To get the FileMetadata for a particular file, you can call getMetadata.
The use of OkHttp3Requestor is optional, and is available if your app happens to already have the the OkHttp v3 library and you want to use it for making Dropbox API calls as well.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!