Need to set the “dependencies” to Dropbox API with Gradle.
The instruction below are for setting dependencies with the Android Studio GUI. I not exactly sure about the Dropbox API, never used it. I tried the instruction with other libraries, JAR and it seems to work OK.
TRY:
With in the Project needing to use Dropbox API.
Android Studio Main Menu - > File - > Project Structure.
Select within the panel on the Left Hand Side the folder where the API will be used. That NEEDS to have access to the Dropbox API.
Select the Tab marked “Dependencies”.
Within the “Dependencies” tab.
One the Top Right Hand side Select the Green Plus Sign.
Pick one of:
1 Library dependency.
2 File dependency.
3 Module dependency.
As An Aside.
Sometimes I had to try more than one of the above to get it to work.
A dialog box pops up
Set the path to the location of the DropBox API.
OK, Gives a a dialog that select the DropBox API.
Click "Apply"
Click "OK"
Gradle sync should run.
Once the “Dependencies” AND gradlle Sync gives “BUILD SUCCESSFUL”.
You Should be able to access the DropBox API within your project.
Android Studio should handle all the import stuff in the header of the Java class file where you need to use the DropBox API.
Just put in the name of one of the class defined in the DropBox API in you project.
when Android Studio underlines that class in red, put you mouse on the red under line in the class file.
ALT ENTER and pick import class:
Hope that helps you sort out getting the DropBox API in to your project.
Mark_97