问题描述:

I'm starting off with jni and trying to get a simple HelloWorld example working. I'm having a linkage error which I'm guessing has to do with my native library not pointing to the correct file path.

I have to use the command:

java -Djava.library.path= ??

What do I set this to? All my so files are in a app/src/main/libs/armeabi/libHelloJni.so , libs/x86/libHelloWorld.so, and so on.

I'm currently doing:

static {

System.loadLibrary("HelloJni")

}

网友答案:

The .so files should be placed in app/src/main/jniLibs/ folder. In your case, it should be app/src/main/jniLibs/armeabi/libHelloJni.so.

相关阅读:
Top