I have never used Android Studio before, so I had to look for it ... these are good instructions for adding an external library to an Android Studio project: How do I add a library project in Android Studio?
After that, with the Dropbox Android Sync SDK, I nested the contents of the libs in the Android SDK into the libs in my Android project, and then added this line to build.gradle (inside dependencies ):
compile files('libs/dropbox-sync-sdk-android.jar')
It seemed to work for me. If you tried this and it didnโt work (or if you tried something else), provide some details.
EDIT Paste my answer from Android and DropboxSync Library for completeness:
I found this SO answer useful: enable .so library in apk in android studio
Part of my build.gradle file now looks like this, and my application starts up successfully:
dependencies { compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar') compile fileTree(dir: 'libs', include: '*.jar') } task nativeLibsToJar( type: Zip, description: 'create a jar archive of the native libs') { destinationDir file("$buildDir/native-libs") baseName 'native-libs' extension 'jar' from fileTree(dir: 'libs', include: '**/*.so') into 'lib/' } tasks.withType(Compile) { compileTask -> compileTask.dependsOn(nativeLibsToJar) }
smarx source share