You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
jonpb
5 years agoExplorer | Level 3
How to add dropbox-core-sdk java using gradle
I'm trying to use dropbox in my android app.
I realize this is more of a gradle question then a dropbox question. I looked at the gradle docs:
https://docs.gradle.org/current/userguide/userguide.html
and the readme.md:
https://github.com/dropbox/dropbox-sdk-java/blob/master/ReadMe.md
I still can't figure how to point gradle to the implementation files required by dropbox-core-sdk. Using:
dependencies { classpath 'com.android.tools.build:gradle:3.6.3' implementation group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '0-SNAPSHOT', changing: true //implementation 'com.dropbox.core:dropbox-core-sdk:3.1.3' //implementation fileTree(dir: 'libs', include: ['*.jar']) }
I get the following error:
Could not find method implementation() for arguments [{group=com.dropbox.core, name=dropbox-core-sdk, version=0-SNAPSHOT, changing=true}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
That '0-SNAPSHOT' version of the dependency would be if you're building the SDK from source. That's only really necessary if you need to modify the SDK for some reason.
Otherwise, I recommend just including the pre-built copy of the library as covered here. That's the first line you have commented out in yours. Do you still get an error if you switch to that one?
- Greg-DBDropbox Staff
That '0-SNAPSHOT' version of the dependency would be if you're building the SDK from source. That's only really necessary if you need to modify the SDK for some reason.
Otherwise, I recommend just including the pre-built copy of the library as covered here. That's the first line you have commented out in yours. Do you still get an error if you switch to that one?
- jonpbExplorer | Level 3
Thanks Greg, that's a big help, I was looking for the jar, and skimmed over that download link.
It turns out it was Android Studio (I guess) I created a new app selecting Empty Activity and it didn't setup gradle correctly. I created a new one with Bssic Activity and now it works. Now I just have remove all the UI stuff the template created :)
Thanks.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 or Facebook.
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!