We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Andre_LB
8 years agoExplorer | Level 3
v2 API
Hi Dropbox Team, I am trying, using Dropbox API, to access my files in Dropbox. I have already done it with Dropbox API v1 and now I would like to do it with v2. For this reason, I performed as fo...
Greg-DB
Dropbox Community Moderator
8 years agoIf you're just trying to run the Android example app as is, you don't need to run gradlew.bat. You can just switch the Dropbox dependency to "compile 'com.dropbox.core:dropbox-core-sdk:3.0.6'" as you mentioned. (You should use that instead of the existing "compile group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '0-SNAPSHOT', changing: true".)
Anyway, I don't see a reference to "org.grangle.loading.StyledTextOutput" in the Android example app. Is that the exact output you're getting?
The com.android.support dependencies are referencing the Android support library. That should already be available, but refer to the Android documentation there if not.
Finally, when registering your API app on the Dropbox App Console, you should supply the name of your app that should be presented to your users, e.g., what they would see on the Google Play Store (not "UserActivity").
Andre_LB
8 years agoExplorer | Level 3
Hi Greg,
thanks for your very prompt reply.
Yes, when in Android Studio I execute "Sync Project with Gradle Files", I have this "Gradle Sync Issue":-
Unable to load class 'org.grangle.loading.StyledTextOutput'
Possible causes for this unexpected error include:
* Gradle's dependency cache may be corrupt (this sometimes occur after a network connection timeout)
* The state of a Gradle build process (daemon) may be corrupt.
Stopping all Gradle daemons may solve this problem.
* Your project may be using a third-part plugin which is not compatible
with the other plugins in the project or the version of Gradle requested by the project.
But for being honest, this is not the only issue.
I mean, in the old Dropbox example (DBRoulette) it was clear its pourpose.
There was a download example and an upload one.
Also, working these two examples, it has been easy to use them.
Now, it is not clear for me what I have to use for authentication, for downloading and for uploading.
It is not clear for me, which example I have to run.
Now it is not working, but when it works, it is not clear which code I will have to use.
Maybe I lost some important information.
Is there documentation explaining this?
Thanks, again!
Andre
- Greg-DB8 years ago
Dropbox Community Moderator
Thanks for the additional information. Unfortunately since that error isn't referencing Dropbox, I'm afraid I can't be of much help with that specifically. I recommend working through the list of potential causes it cites.
Anyway, thanks for the feedback. I understand how the Android example could certainly use more detailed documentation. For reference, to set up an app to use the SDK like the sample app does:
- Your AndroidManifest.xml should be set up as shown here.
- You start the flow by calling startOAuth2Authentication as shown here.
- You complete the flow by calling getOAuth2Token as shown here.
- Your app can store and re-use the resulting access token for that user, as the example does here.
- Once you have an access token, you can make a client as shown here.
- With a client, you can make whatever calls you want. The different pieces of functionality in the Android sample are broken out in different files listed here.
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!