How can I link native library in Android Studio?

android, android-gradle-plugin, android-studio, linker

Solution

This works now in Android Studio. You can use `CFlags -I` and `ldFlags -L` when building.

Take a look at this good example.

Problem

I'm currently using a library that I've already compiled into `.so` files. I've put the library into `jniLibs` and I load it with: ``` System.loadLibrary("library"); ``` Now, I want to use this library in some of my own native code, so how can I link these `.so` files with my own native files from the `jni` folder?

Original source

Related problems