How to change libs directory in Gradle?
android, android-gradle-plugin, android-studio, gradle, zbar
Solution
Actually, @Michael's answer is correct, it is also obsolete. Now, using gradle all you need to do is to add the lines below in the build.gradle file:
android {
...
sourceSets {
main.jniLibs.srcDirs = ['libs']
test.jniLibs.srcDirs = ['libs']
}
}
or directly put your .so libraries into:
src/main/jniLibs
This way, when you build your application or library, the jni libraries are being copied into destination .jar/.aar file.
Problem
I want to integrate Zbar into my application but cant seem to figure out how to accomplish this using the new Android Studio. I have looked through the example and have copied over the code without any issues. The problem I am having is adding the libs to my project I cant seem to figure out how to do it. Could someone walk me through it?