Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I link native library in Android Studio?

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?

like image 976
dragostis Avatar asked Oct 20 '22 07:10

dragostis


1 Answers

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

Take a look at this good example.

like image 77
dragostis Avatar answered Oct 23 '22 01:10

dragostis