1

I have a package named com.self.tryffmpeg. There's a file MainActivity.java inside that package which declares two native functions from the C inside the JNI folder

static {

System.loadLibrary("ffmpeg");  
System.loadLibrary("ffmpeg-test-jni");   
}

    private native int createEngine();
private native String loadFile(String file, byte[] array);
  }

Inside the JNI folder, there's a C file which exports the functions needed by the MainActivity.java.

Inside the C , I exports the functions

NIEXPORT jint JNICALL Java_com_self_tryffmpeg_MainActivity_createEngine(JNIEnv* env, jclass clazz)
{

}


JNIEXPORT jintArray JNICALL Java_com_self_tryffmpeg_MainActivity_loadFile(JNIEnv* env, jobject obj,jstring file,jbyteArray array) {
}

But the error is the functions of loadFile and createEngine cannot be resolved. UnsatisfiedLinkError. Did i do anything wrong with that. I thought I export the functions correctly.

4

0 回答 0