Reputation: 105
I have an android project built in eclipse environment with the Android SDK , now I want to add a prebuilt library (.so) to this project , should i use NDK to do that?
Upvotes: 1
Views: 477
Reputation: 4733
No, just create a jniLibs
folder on the same level of your res
and java
folders, and put the .so files in that.
Upvotes: 2
Reputation: 14473
you usually don't need to use the NDK to use a native library (.so file) from Java. You only need it if you want to create/recompile a .so file or if the .so files doesn't provide any method implementation to Java.
From where does come your library ? A .jar or a Java class should at least come with it.
In order to use your .so file from Java, you need to know what Java methods it's defining to define the same as native from your Java code, from the same class from the same package name the .so file is made for.
Upvotes: 1